From bda203d11d37d50ab835768bbd14619150df2fd4 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 13 Jul 2022 10:41:30 +0200 Subject: [PATCH] add accompanying courses exports in a group --- .../Export/Export/CountAccompanyingCourse.php | 8 +++++++- .../Export/Export/ListAccompanyingCourse.php | 8 +++++++- src/Bundle/ChillPersonBundle/translations/messages.fr.yml | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php index 4984fd9ae..ab9542b7f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Export; use Chill\MainBundle\Export\ExportInterface; use Chill\MainBundle\Export\FormatterInterface; +use Chill\MainBundle\Export\GroupedExportInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; use Doctrine\ORM\EntityManagerInterface; @@ -22,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Security\Core\Role\Role; use LogicException; -class CountAccompanyingCourse implements ExportInterface +class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface { /** * @var EntityManagerInterface @@ -110,4 +111,9 @@ class CountAccompanyingCourse implements ExportInterface { return []; } + + public function getGroup(): string + { + return 'Exports of accompanying courses'; + } } \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingCourse.php index 4b8a6462a..ca004b066 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingCourse.php @@ -12,13 +12,14 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Export; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\GroupedExportInterface; use Chill\MainBundle\Export\ListInterface; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Validator\Context\ExecutionContextInterface; -class ListAccompanyingCourse implements ListInterface, ExportElementValidatedInterface +class ListAccompanyingCourse implements ListInterface, ExportElementValidatedInterface, GroupedExportInterface { /** @@ -113,4 +114,9 @@ class ListAccompanyingCourse implements ListInterface, ExportElementValidatedInt { // TODO: Implement validateForm() method. } + + public function getGroup(): string + { + return 'Exports of accompanying courses'; + } } \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 25dc94665..4fbd06b22 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -336,6 +336,7 @@ Fields to include in export: Champs à inclure dans l'export Address valid at this date: Addresse valide à cette date List duplicates: Liste des doublons Create a list of duplicate people: Créer la liste des personnes détectées comme doublons. +Exports of accompanying courses: Exports des parcours d'accompagnement Count accompanying courses: Nombre de parcours Count accompanying courses by various parameters: Compte le nombre de parcours d'accompagnement en fonction de différents filtres. List accompanying courses: Liste des parcours