Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceList::initialize
Initializes the list with choices.
Safe to be called multiple times. The list is cleared on every call.
Signature
protected function initialize(Traversable
$choices,
array
$labels,
array
$preferredChoices )
Parameters
$choices
— object- The choices to write into the list.
$labels
— array- The labels belonging to the choices.
$preferredChoices
— array- The choices to display with priority.