bbit / admin-bundle
symfony AdminBundle
Installs: 1 145
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:HTML
Type:symfony-bundle
Requires
- php: >=5.5
- bbit/data-grid-bundle: 1.2.*
- knplabs/knp-menu-bundle: ^2.0
- symfony/assetic-bundle: 2.8.*
Requires (Dev)
- symfony/symfony: >=2.4.0
This package is not auto-updated.
Last update: 2024-11-10 03:00:18 UTC
README
Appkernel:
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:
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:
item_admin:
class: AppBundle\Admin\ItemAdmin
arguments: ['AppBundle\Entity\Item']
tags:
- { name: bbit.admin, label: 'items', icon: 'glyphicon glyphicon-apple' }
Config:
bbit_admin:
route_prefix: admin # optional
disable_auth: false # optional
Routing:
bbit_admin:
resource: "@BBITAdminBundle/Resources/config/routing.yml"
prefix: /