14/11
2017
dev-master
9999999-devsymfony AdminBundle
MIT
The Requires
The Development Requires
by Janssens Sam
symfony AdminBundle
Appkernel:, (*1)
new BBIT\AdminBundle\BBITAdminBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Knp\Bundle\MenuBundle\KnpMenuBundle(), new BBIT\DataGridBundle\BBITDataGridBundle(), new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
Create AdminClass:, (*2)
class ItemAdmin extends BaseAdmin { protected function listQueryBuilder() { $qb = parent::listQueryBuilder(); return $qb; } protected function mapListFields(DataGridService $grid) { $grid->addField('name', 'string', [ 'sortable' => false, 'filterable' => false, ]); } protected function mapFormFields(FormBuilder $formBuilder) { $formBuilder->add('name'); } }
Create Service:, (*3)
item_admin: class: AppBundle\Admin\ItemAdmin arguments: ['AppBundle\Entity\Item'] tags: - { name: bbit.admin, label: 'items', icon: 'glyphicon glyphicon-apple' }
Config:, (*4)
bbit_admin: route_prefix: admin # optional disable_auth: false # optional
Routing:, (*5)
bbit_admin: resource: "@BBITAdminBundle/Resources/config/routing.yml" prefix: /
symfony AdminBundle
MIT