mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
ACP IntensityFilter: Do not loop on choices to show the picked one
This commit is contained in:
parent
36590e7810
commit
a324121f01
@ -73,15 +73,9 @@ class IntensityFilter implements FilterInterface
|
|||||||
|
|
||||||
public function describeAction($data, $format = 'string'): array
|
public function describeAction($data, $format = 'string'): array
|
||||||
{
|
{
|
||||||
foreach (self::CHOICES as $k => $v) {
|
|
||||||
if ($v === $data['accepted_intensities']) {
|
|
||||||
$choice = $k;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'Filtered by intensity: only %intensity%', [
|
'Filtered by intensity: only %intensity%', [
|
||||||
'%intensity%' => $this->translator->trans($choice),
|
'%intensity%' => $this->translator->trans($data['accepted_intensities']),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user