mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Creation of DocGenTemplate entity
This commit is contained in:
@@ -13,7 +13,7 @@ use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
|
||||
*
|
||||
* @link http://symfony.com/doc/current/cookbook/bundles/extension.html
|
||||
*/
|
||||
class ChillCalendarExtension extends Extension implements PrependExtensionInterface
|
||||
class ChillDocGeneratorExtension extends Extension implements PrependExtensionInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
@@ -33,19 +33,49 @@ class ChillCalendarExtension extends Extension implements PrependExtensionInterf
|
||||
public function prepend(ContainerBuilder $container)
|
||||
{
|
||||
$this->preprendRoutes($container);
|
||||
$this->prependCruds($container);
|
||||
}
|
||||
|
||||
protected function preprendRoutes(ContainerBuilder $container)
|
||||
{
|
||||
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'routing' => [
|
||||
'resources' => [
|
||||
'@ChillDocGeneratorBundle/Resources/config/routing.yml'
|
||||
]
|
||||
]
|
||||
]);
|
||||
$container->prependExtensionConfig('chill_main', array(
|
||||
'routing' => array(
|
||||
'resources' => array(
|
||||
'@ChillDocGeneratorBundle/Resources/config/routes.yml'
|
||||
)
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param ContainerBuilder $container
|
||||
*/
|
||||
protected function prependCruds(ContainerBuilder $container)
|
||||
{
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'cruds' => [
|
||||
[
|
||||
'class' => \Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate::class,
|
||||
'name' => 'docgen_template',
|
||||
'base_path' => '/admin/docgen/template',
|
||||
'form_class' => \Chill\DocGeneratorBundle\Form\DocGeneratorTemplateType::class,
|
||||
'controller' => \Chill\DocGeneratorBundle\Controller\AdminDocGeneratorTemplateController::class,
|
||||
'actions' => [
|
||||
'index' => [
|
||||
'template' => '@ChillDocGenerator/Admin/DocGeneratorTemplate/index.html.twig',
|
||||
'role' => 'ROLE_ADMIN'
|
||||
],
|
||||
'new' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
'template' => '@ChillDocGenerator/Admin/DocGeneratorTemplate/new.html.twig',
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
'template' => '@ChillDocGenerator/Admin/DocGeneratorTemplate/edit.html.twig',
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user