Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList::isPreferred
Returns whether the given choice should be preferred judging by the given array of preferred choices.
Optimized for performance by treating the preferred choices as array where choices are stored in the keys.
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.