-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Hi Yann,
In my project we need to get the translated choice in a list.
So in every actions, my new dev initialize an array with AbstractTranslatedEnum::getChoices and check if the value is set before displaying it.
Can we :
- make an internal variable in AbstractTranslatedEnum to store the result so we do'nt have to walk through the array map each time the method is called
- and a getChoice method like
public function getTranlatedChoice($value): string
{
if(!this->hasChoice($value)) {
return '';
}
return $this->getChoices()[$value];
}
I have Louis who will be more than happy to make it's first PR on a open source project.
What do you think about it ?
Nico
Metadata
Metadata
Assignees
Labels
No labels