mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
ACP ConfidentialFilter: Do not loop on choices to show the picked one
This commit is contained in:
parent
02330fcc75
commit
a41483be00
@ -73,15 +73,11 @@ class ConfidentialFilter implements FilterInterface
|
||||
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
{
|
||||
foreach (self::CHOICES as $k => $v) {
|
||||
if ($v === $data['accepted_confidentials']) {
|
||||
$choice = $k;
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'Filtered by confidential: only %confidential%', [
|
||||
'%confidential%' => $this->translator->trans($choice),
|
||||
'%confidential%' => $this->translator->trans(
|
||||
$data['accepted_confidentials'] ? 'is confidential' : 'is not confidential'
|
||||
),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user