2017 © Pedro Peláez
 

symfony-bundle admin-bundle

Symfony AdminBundle

image

foreverglory/admin-bundle

Symfony AdminBundle

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

GloryAdminBundle

GloryAdminBundle 基于 Symfony,使用 AdminLTE 前端而开发的后台管理, (*1)

使用

Composer

composer require foreverglory/admin-bundle

or add composer.json file, after composer update, (*2)

{
    require: {
        "foreverglory/theme-bundle": "dev-master"
    }
}

Kernel

//app/AppKernel.php
public function registerBundles()
{
    return array(
        // require bundles
        new Sp\BowerBundle\SpBowerBundle(),
        new Glory\Bundle\SettingBundle\GlorySettingBundle(),
        new Glory\Bundle\MenuBundle\GloryMenuBundle(),
        new Glory\Bundle\WebBundle\GloryWebBundle(),
        // core bundle
        new Glory\Bundle\AdminBundle\GloryAdminBundle(),
        // more ...
    );
}

Configure

#app/config/config.yml
sp_bower:
    bundles:
        # 启用 bower 资源
        GloryAdminBundle: ~
glory_setting: ~
glory_menu: ~
glory_admin:
    # css,js资源,将替换默认
    stylesheets: ~
    javascripts: ~
    # 仪表盘配置
    dashboard:
        - { include: AppBundle:Block:analysis.html.twig }
        - { controller: AppBundle:Dashboard:calendar }
        # more ...
#app/config/routing.yml
glory_admin:
    resource: "@GloryAdminBundle/Resources/config/routing.yml"
    prefix:   /
#app/config/security.yml
security:
    access_control:
        - { path: ^/admin, role: ROLE_ADMIN }

Data

  • install assetic
php app/console sp:bower:install
  • install menu database
php app/console gloryadmin:install menu

Enjoy it

The Versions