mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 04:23:49 +00:00
[closing motive] add an hierarchy + admin section for closing motives
This commit is contained in:
@@ -135,6 +135,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
$this->prependRoleHierarchy($container);
|
||||
$this->prependHomepageWidget($container);
|
||||
$this->prependDoctrineDQL($container);
|
||||
$this->prependCruds($container);
|
||||
|
||||
$bundles = $container->getParameter('kernel.bundles');
|
||||
//add ChillMain to assetic-enabled bundles
|
||||
@@ -240,4 +241,33 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
protected function prependCruds(ContainerBuilder $container)
|
||||
{
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'cruds' => [
|
||||
[
|
||||
'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive::class,
|
||||
'name' => 'closing_motive',
|
||||
'base_path' => '/admin/closing-motive',
|
||||
'form_class' => \Chill\PersonBundle\Form\ClosingMotiveType::class,
|
||||
'controller' => \Chill\PersonBundle\Controller\AdminClosingMotiveController::class,
|
||||
'actions' => [
|
||||
'index' => [
|
||||
'template' => '@ChillPerson/ClosingMotive/index.html.twig',
|
||||
'role' => 'ROLE_ADMIN'
|
||||
],
|
||||
'new' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
'template' => '@ChillPerson/ClosingMotive/new.html.twig',
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
'template' => '@ChillPerson/ClosingMotive/edit.html.twig',
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user