mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
rename data attribute
This commit is contained in:
parent
bf0ca7b777
commit
04ca61be81
@ -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)
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user