Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceList::isPreferred
Returns whether the given choice should be preferred judging by the given array of preferred choices.
Extension point to optimize performance by changing the structure of the $preferredChoices array.
Signature
protected function isPreferred(mixed
$choice,
array
$preferredChoices )
Parameters
$choice
— mixed- The choice to test.
$preferredChoices
— array- An array of preferred choices.
Returns
- Boolean
- Whether the choice is preferred.