diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialIssueFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialIssueFilter.php index c6a031134..27f01cb86 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialIssueFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialIssueFilter.php @@ -42,7 +42,7 @@ class SocialIssueFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_socialissue', EntityType::class, [ + $builder->add('accepted_socialissues', EntityType::class, [ 'class' => SocialIssue::class, 'choice_label' => function ($socialIssue) { return $this->socialIssueRender->renderString($socialIssue, []); @@ -61,7 +61,7 @@ class SocialIssueFilter implements FilterInterface { $issues = []; - $socialissues = $this->addParentIssues($data['accepted_socialissue']); + $socialissues = $this->addParentIssues($data['accepted_socialissues']); foreach ($socialissues as $i) { if ('null' === $i) { @@ -82,7 +82,7 @@ class SocialIssueFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data) + public function alterQuery(QueryBuilder $qb, $data): QueryBuilder { $qb->join('acp.socialIssues', 'si'); @@ -97,7 +97,7 @@ class SocialIssueFilter implements FilterInterface $qb->add('where', $where); $qb->setParameter('socialissues', - $this->addParentIssues($data['accepted_socialissue']) + $this->addParentIssues($data['accepted_socialissues']) ); } @@ -110,7 +110,7 @@ class SocialIssueFilter implements FilterInterface * @param $accepted_issues * @return array */ - private function addParentIssues($accepted_issues) + private function addParentIssues($accepted_issues): array { $array = []; foreach ($accepted_issues as $i) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/StepFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/StepFilter.php index ac47be949..e3fbc19d5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/StepFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/StepFilter.php @@ -37,7 +37,7 @@ class StepFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('accepted_step', ChoiceType::class, [ + $builder->add('accepted_steps', ChoiceType::class, [ 'choices' => self::STEPS, 'multiple' => false, 'expanded' => true, @@ -53,7 +53,7 @@ class StepFilter implements FilterInterface public function describeAction($data, $format = 'string') { - $step = array_flip(self::STEPS)[$data['accepted_step']]; + $step = array_flip(self::STEPS)[$data['accepted_steps']]; return ["Filtered by steps: only %step%", [ '%step%' => $this->translator->trans($step) @@ -77,7 +77,7 @@ class StepFilter implements FilterInterface } $qb->add('where', $where); - $qb->setParameter('step', $data['accepted_step']); + $qb->setParameter('step', $data['accepted_steps']); } public function applyOn() diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index ed82fdae6..8e532dd35 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -383,11 +383,11 @@ Filter by user job: Filtrer par métier du référent "Filtered by user job: only %job%": "Filtré par métier du référent: uniquement %job%" Filter by social issue: Filtrer par problématiques sociales -Accepted socialissue: Problématiques sociales +Accepted socialissues: Problématiques sociales "Filtered by socialissues: only %socialissues%": "Filtré par problématique sociale: uniquement %socialissues%" Filter by step: Filtrer par statut du parcours -Accepted step: Statuts +Accepted steps: Statuts "Filtered by steps: only %step%": "Filtré par statut du parcours: uniquement %step%" ## aggregators