From 15af0203fff262f1c0fc8bc100ad5cc4f1657433 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 21 Mar 2022 10:21:12 +0100 Subject: [PATCH] add menu entry in section menu --- .../Menu/SectionMenuBuilder.php | 18 ++++++++++-------- .../translations/messages.fr.yml | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php index 04f989d84..4635eb4fc 100644 --- a/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php @@ -22,15 +22,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class SectionMenuBuilder implements LocalMenuBuilderInterface { - /** - * @var AuthorizationCheckerInterface - */ - protected $authorizationChecker; + protected AuthorizationCheckerInterface $authorizationChecker; - /** - * @var TranslatorInterface - */ - protected $translator; + protected TranslatorInterface $translator; /** * SectionMenuBuilder constructor. @@ -63,6 +57,14 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface 'order' => 11, 'icons' => ['plus'], ]); + + $menu->addChild($this->translator->trans('Accompanying courses of users'), [ + 'route' => 'chill_course_list_reassign', + ]) + ->setExtras([ + 'order' => 12, + 'icons' => ['task'], + ]); } public static function getMenuIds(): array diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index bc238570d..57fc039b8 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -194,6 +194,7 @@ No accompanying user: Aucun accompagnant No data given: Pas d'information Participants: Personnes impliquées Create an accompanying course: Créer un parcours +Accompanying courses of users: Parcours des utilisateurs This accompanying course is still a draft: Ce parcours est encore à l'état brouillon. Associated peoples: Usagers concernés Resources: Interlocuteurs privilégiés