diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountSocialActions.php b/src/Bundle/ChillPersonBundle/Export/Export/CountSocialActions.php index b9c2dd746..a41f4a6d2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountSocialActions.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountSocialActions.php @@ -21,8 +21,9 @@ use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; use LogicException; +use Symfony\Component\Security\Core\Role\Role; -class CountSocialAction implements ExportInterface, GroupedExportInterface +class CountSocialActions implements ExportInterface, GroupedExportInterface { protected SocialActionRepository $socialActionRepository; @@ -90,9 +91,10 @@ class CountSocialAction implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole(): string + public function requiredRole(): Role { - return AccompanyingPeriodVoter::STATS; + //TODO change to string, but changes needed also in exportManager and possibly other locations. + return new Role(AccompanyingPeriodVoter::STATS); } public function supportsModifiers(): array diff --git a/src/Bundle/ChillPersonBundle/config/services/exports.yaml b/src/Bundle/ChillPersonBundle/config/services/exports.yaml index 9c5638431..4780a9aad 100644 --- a/src/Bundle/ChillPersonBundle/config/services/exports.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/exports.yaml @@ -44,6 +44,8 @@ services: class: Chill\PersonBundle\Export\Export\CountSocialActions autowire: true autoconfigure: true + tags: + - { name: chill.export, alias: count_social_actions } chill.person.export.filter_gender: class: Chill\PersonBundle\Export\Filter\GenderFilter diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index c764817b3..af7c213b4 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -340,7 +340,7 @@ Create a list of duplicate people: Créer la liste des personnes détectées com Exports of accompanying courses: Exports des parcours d'accompagnement Count accompanying courses: Nombre de parcours -Count social actions: Nombre d'actions d'accompagnement +Count social actions: Nombre d'actions Count accompanying courses by various parameters: Compte le nombre de parcours en fonction de différents filtres. Count social actions by various parameters: Compte le nombre d'actions d'accompagnement en fonction de différents filtres. Accompanying courses duration: Durée moyenne des parcours