From f70e3b799717e62a8e80bcb824b1c655e01b8dac Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 29 Jun 2022 15:05:59 +0200 Subject: [PATCH 1/9] quick fix: use Scope class instead of classname --- src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php b/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php index 2f3378ae8..6646cd2b5 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php @@ -87,7 +87,7 @@ class ComposedRoleScopeType extends AbstractType }, ]) ->add('scope', EntityType::class, [ - 'class' => 'ChillMainBundle:Scope', + 'class' => Scope::class, 'choice_label' => static function (Scope $scope) use ($translatableStringHelper) { return $translatableStringHelper->localize($scope->getName()); }, From f48e197e0ba36b80e3015ced23b4ecec6c02c453 Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 30 Jun 2022 07:29:33 +0200 Subject: [PATCH 2/9] [main] fix deprecations for Export/PickCenterType --- .../ChillMainBundle/Form/Type/Export/PickCenterType.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php index 2fe5ff8f2..1c6c01f72 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php @@ -75,14 +75,16 @@ class PickCenterType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { + + $export = $this->exportManager->getExport($options['export_alias']); $centers = $this->authorizationHelper->getReachableCenters( $this->user, - $export->requiredRole() + $export->requiredRole()->__toString() ); $builder->add(self::CENTERS_IDENTIFIERS, EntityType::class, [ - 'class' => 'ChillMainBundle:Center', + 'class' => Center::class, 'query_builder' => static function (EntityRepository $er) use ($centers) { $qb = $er->createQueryBuilder('c'); $ids = array_map( From c76f2a81c9a4b915c958d1803fafaf95bd19560b Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 30 Jun 2022 07:37:27 +0200 Subject: [PATCH 3/9] [main] cast uniqid arg to string in ExportController --- src/Bundle/ChillMainBundle/Controller/ExportController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Controller/ExportController.php b/src/Bundle/ChillMainBundle/Controller/ExportController.php index bc3f994a7..5dcd158f6 100644 --- a/src/Bundle/ChillMainBundle/Controller/ExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/ExportController.php @@ -405,7 +405,7 @@ class ExportController extends AbstractController 'alias' => $alias, ]; unset($parameters['_token']); - $key = md5(uniqid(mt_rand(), false)); + $key = md5(uniqid((string) mt_rand(), false)); $this->redis->setEx($key, 3600, serialize($parameters)); From 31e1bfdf802fe6acd6ac5571eaef9c77643c91b6 Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 4 Jul 2022 16:19:03 +0200 Subject: [PATCH 4/9] export: cast role as string in PickCenterType --- src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php index 1c6c01f72..9c36d452f 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php @@ -80,7 +80,7 @@ class PickCenterType extends AbstractType $export = $this->exportManager->getExport($options['export_alias']); $centers = $this->authorizationHelper->getReachableCenters( $this->user, - $export->requiredRole()->__toString() + (string) $export->requiredRole() ); $builder->add(self::CENTERS_IDENTIFIERS, EntityType::class, [ From 3ddab4f6e2de750e661dcc209509289b10f9d5c2 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 4 Jul 2022 16:32:12 +0200 Subject: [PATCH 5/9] documente un souci avec docker lors de l'installation de chill --- docs/source/installation/index.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/source/installation/index.rst b/docs/source/installation/index.rst index 1312480e3..9c01f9b8b 100644 --- a/docs/source/installation/index.rst +++ b/docs/source/installation/index.rst @@ -65,6 +65,17 @@ This script will : 4. build assets +.. note:: + + In some cases it can happen that an old image (chill_base_php or chill_php) stored in the docker cache will make the script fail. To solve this problem you have to delete the image and the container, before the make init : + +.. code-block:: bash + + docker-compose images php + docker rmi -f chill_php:prod + docker-compose rm php + + 4. Start the project ==================== From 3cf8609e8f73f17a4a8b06d83d65529aa0fdd14c Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 4 Jul 2022 17:20:03 +0200 Subject: [PATCH 6/9] [event] fix deprecation (type missing) --- src/Bundle/ChillEventBundle/Controller/EventController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillEventBundle/Controller/EventController.php b/src/Bundle/ChillEventBundle/Controller/EventController.php index 0dcaf176a..5d00387c8 100644 --- a/src/Bundle/ChillEventBundle/Controller/EventController.php +++ b/src/Bundle/ChillEventBundle/Controller/EventController.php @@ -273,7 +273,7 @@ class EventController extends AbstractController /** * @var Center $centers */ - $centers = $this->authorizationHelper->getReachableCenters($this->getUser(), $role); + $centers = $this->authorizationHelper->getReachableCenters($this->getUser(), (string) $role); if (count($centers) === 1) { return $this->redirectToRoute('chill_event__event_new', [ From 135b385c112025a055e73c84d04a89ed05e19c0a Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 4 Jul 2022 17:29:45 +0200 Subject: [PATCH 7/9] fix rust indent --- docs/source/installation/index.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/installation/index.rst b/docs/source/installation/index.rst index 9c01f9b8b..a962148f7 100644 --- a/docs/source/installation/index.rst +++ b/docs/source/installation/index.rst @@ -69,11 +69,11 @@ This script will : In some cases it can happen that an old image (chill_base_php or chill_php) stored in the docker cache will make the script fail. To solve this problem you have to delete the image and the container, before the make init : -.. code-block:: bash + .. code-block:: bash - docker-compose images php - docker rmi -f chill_php:prod - docker-compose rm php + docker-compose images php + docker rmi -f chill_php:prod + docker-compose rm php 4. Start the project From 389f014d361ec8880d8c98cb4fa1f28e8656b3d0 Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 5 Jul 2022 10:18:07 +0200 Subject: [PATCH 8/9] [event] fix deprecation (typing) --- src/Bundle/ChillEventBundle/Form/Type/PickEventType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php b/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php index 6b0b2d1ab..68500e55e 100644 --- a/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php +++ b/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php @@ -151,7 +151,7 @@ class PickEventType extends AbstractType } else { $centers = $this->authorizationHelper->getReachableCenters( $this->user, - $options['role'] + (string) $options['role'] ); } From 36e35f2e8fd457e437f27982684d4b241da51870 Mon Sep 17 00:00:00 2001 From: nobohan Date: Wed, 6 Jul 2022 13:36:20 +0200 Subject: [PATCH 9/9] [event] refactor admin for event bundle --- .../Controller/AdminController.php | 17 ++---- .../Menu/AdminMenuBuilder.php | 61 +++++++++++++++++++ .../Resources/views/Admin/index.html.twig | 13 ++++ .../Resources/views/Admin/layout.html.twig | 31 ---------- .../Resources/views/Admin/menu.html.twig | 18 ------ .../Resources/views/EventType/edit.html.twig | 2 +- .../Resources/views/EventType/index.html.twig | 2 +- .../Resources/views/EventType/new.html.twig | 2 +- .../Resources/views/EventType/show.html.twig | 2 +- .../Resources/views/Role/edit.html.twig | 2 +- .../Resources/views/Role/index.html.twig | 2 +- .../Resources/views/Role/new.html.twig | 2 +- .../Resources/views/Role/show.html.twig | 2 +- .../Resources/views/Status/edit.html.twig | 2 +- .../Resources/views/Status/index.html.twig | 2 +- .../Resources/views/Status/new.html.twig | 2 +- .../Resources/views/Status/show.html.twig | 2 +- .../ChillEventBundle/config/routes.yaml | 34 +++++------ .../ChillEventBundle/config/services.yaml | 9 +++ 19 files changed, 118 insertions(+), 89 deletions(-) create mode 100644 src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php create mode 100644 src/Bundle/ChillEventBundle/Resources/views/Admin/index.html.twig delete mode 100644 src/Bundle/ChillEventBundle/Resources/views/Admin/layout.html.twig diff --git a/src/Bundle/ChillEventBundle/Controller/AdminController.php b/src/Bundle/ChillEventBundle/Controller/AdminController.php index aca3b5a04..81918436e 100644 --- a/src/Bundle/ChillEventBundle/Controller/AdminController.php +++ b/src/Bundle/ChillEventBundle/Controller/AdminController.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\EventBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\Routing\Annotation\Route; /** * Class AdminController @@ -20,18 +21,12 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; class AdminController extends AbstractController { /** - * @return \Symfony\Component\HttpFoundation\Response + * Event admin. + * + * @Route("/{_locale}/admin/event", name="chill_event_admin_index") */ - public function indexAction() + public function indexAdminAction() { - return $this->render('ChillEventBundle:Admin:layout.html.twig'); - } - - /** - * @return \Symfony\Component\HttpFoundation\RedirectResponse - */ - public function redirectToAdminIndexAction() - { - return $this->redirectToRoute('chill_main_admin_central'); + return $this->render('ChillEventBundle:Admin:index.html.twig'); } } diff --git a/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php new file mode 100644 index 000000000..cede2a5b8 --- /dev/null +++ b/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php @@ -0,0 +1,61 @@ +authorizationChecker = $authorizationChecker; + } + + public function buildMenu($menuId, MenuItem $menu, array $parameters) + { + if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) { + return; + } + + $menu->addChild('Events', [ + 'route' => 'chill_event_admin_index', + ]) + ->setAttribute('class', 'list-group-item-header') + ->setExtras([ + 'order' => 6500 + ]); + + $menu->addChild('Event type', [ + 'route' => 'chill_eventtype_admin', + ])->setExtras(['order' => 6510]); + + $menu->addChild('Event status', [ + 'route' => 'chill_event_admin_status', + ])->setExtras(['order' => 6520]); + + $menu->addChild('Role', [ + 'route' => 'chill_event_admin_role', + ])->setExtras(['order' => 6530]); + } + + public static function getMenuIds(): array + { + return ['admin_section', 'admin_event']; + } +} diff --git a/src/Bundle/ChillEventBundle/Resources/views/Admin/index.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Admin/index.html.twig new file mode 100644 index 000000000..4ad95b49c --- /dev/null +++ b/src/Bundle/ChillEventBundle/Resources/views/Admin/index.html.twig @@ -0,0 +1,13 @@ +{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %} + +{% block vertical_menu_content %} + {{ chill_menu('admin_event', { + 'layout': '@ChillMain/Admin/menu_admin_section.html.twig', + }) }} +{% endblock %} + +{% block layout_wvm_content %} + {% block admin_content %} +

{{ 'Events configuration' |trans }}

+ {% endblock %} +{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillEventBundle/Resources/views/Admin/layout.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Admin/layout.html.twig deleted file mode 100644 index 827f4610e..000000000 --- a/src/Bundle/ChillEventBundle/Resources/views/Admin/layout.html.twig +++ /dev/null @@ -1,31 +0,0 @@ -{# - * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, - / - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . -#} - -{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %} - -{% block vertical_menu_content %} - {{ chill_menu('admin_events', { - 'layout': '@ChillEvent/Admin/menu.html.twig', - }) }} -{% endblock %} - -{% block layout_wvm_content %} - {% block admin_content %} -

{{ 'Events configuration' |trans }}

- {% endblock %} -{% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillEventBundle/Resources/views/Admin/menu.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Admin/menu.html.twig index 2e804277d..f587d97c4 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Admin/menu.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Admin/menu.html.twig @@ -1,21 +1,3 @@ -{# - * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, - / - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . -#} - {% extends "@ChillMain/Menu/verticalMenu.html.twig" %} {% block v_menu_title %}{{ 'Events configuration menu'|trans }}{% endblock %} diff --git a/src/Bundle/ChillEventBundle/Resources/views/EventType/edit.html.twig b/src/Bundle/ChillEventBundle/Resources/views/EventType/edit.html.twig index 3f2f5b146..205b8791b 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/EventType/edit.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/EventType/edit.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/Resources/views/EventType/index.html.twig b/src/Bundle/ChillEventBundle/Resources/views/EventType/index.html.twig index 308974770..9c62697f3 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/EventType/index.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/EventType/index.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/Resources/views/EventType/new.html.twig b/src/Bundle/ChillEventBundle/Resources/views/EventType/new.html.twig index e7d2f0d66..4c0823cdc 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/EventType/new.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/EventType/new.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/Resources/views/EventType/show.html.twig b/src/Bundle/ChillEventBundle/Resources/views/EventType/show.html.twig index 3e0aaba03..0dbd66b17 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/EventType/show.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/EventType/show.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/Resources/views/Role/edit.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Role/edit.html.twig index a0b2d4f92..0c9d61795 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Role/edit.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Role/edit.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%}

{{ 'Role edit'|trans }}

diff --git a/src/Bundle/ChillEventBundle/Resources/views/Role/index.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Role/index.html.twig index 4fb4f866f..091b2f6ac 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Role/index.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Role/index.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/Resources/views/Role/new.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Role/new.html.twig index da0a3e459..03681f30c 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Role/new.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Role/new.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/Resources/views/Role/show.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Role/show.html.twig index 2fb920eb2..68a15958f 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Role/show.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Role/show.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/Resources/views/Status/edit.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Status/edit.html.twig index e376e05e3..3d00a66fa 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Status/edit.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Status/edit.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/Resources/views/Status/index.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Status/index.html.twig index 7ac4ed37e..144a80e51 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Status/index.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Status/index.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/Resources/views/Status/new.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Status/new.html.twig index aa3ecc374..03ba1de3a 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Status/new.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Status/new.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/Resources/views/Status/show.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Status/show.html.twig index 624997026..0e0a75069 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Status/show.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Status/show.html.twig @@ -1,4 +1,4 @@ -{% extends "ChillEventBundle:Admin:layout.html.twig" %} +{% extends "ChillEventBundle:Admin:index.html.twig" %} {% block admin_content -%} diff --git a/src/Bundle/ChillEventBundle/config/routes.yaml b/src/Bundle/ChillEventBundle/config/routes.yaml index 2abb338bd..afa6bbe2b 100644 --- a/src/Bundle/ChillEventBundle/config/routes.yaml +++ b/src/Bundle/ChillEventBundle/config/routes.yaml @@ -9,24 +9,24 @@ chill_event_participation: ## ADMIN -chill_event_admin: +chill_event_admin_index: path: /{_locale}/admin/event - controller: Chill\EventBundle\Controller\AdminController::indexAction - options: - menus: - admin_section: - order: 2100 - label: "Events" - icons: ['calendar'] + controller: Chill\EventBundle\Controller\AdminController::indexAdminAction + # options: + # menus: + # admin_section: + # order: 2100 + # label: "Events" + # icons: ['calendar'] -chill_event_admin_redirect_to_admin_index: - path: /{_locale}/admin/event_redirect_to_main - controller: Chill\EventBundle\Controller\AdminController::redirectToAdminIndexAction - options: - menus: - admin_events: - order: 0 - label: Main admin menu +# chill_event_admin_redirect_to_admin_index: +# path: /{_locale}/admin/event_redirect_to_main +# controller: Chill\EventBundle\Controller\AdminController::redirectToAdminIndexAction +# options: +# menus: +# admin_events: +# order: 0 +# label: Main admin menu chill_event_admin_status: resource: "@ChillEventBundle/config/routes/status.yaml" @@ -39,4 +39,4 @@ chill_event_admin_role: chill_event_admin_event_type: resource: "@ChillEventBundle/config/routes/eventtype.yaml" prefix: /{_locale}/admin/event/event_type - + diff --git a/src/Bundle/ChillEventBundle/config/services.yaml b/src/Bundle/ChillEventBundle/config/services.yaml index 8287f32b5..cee12a024 100644 --- a/src/Bundle/ChillEventBundle/config/services.yaml +++ b/src/Bundle/ChillEventBundle/config/services.yaml @@ -1,2 +1,11 @@ services: + Chill\EventBundle\Controller\: + autowire: true + resource: '../Controller' + tags: ['controller.service_arguments'] + Chill\EventBundle\Menu\: + autowire: true + autoconfigure: true + resource: '../Menu/' + tags: ['chill.menu_builder'] \ No newline at end of file