CachingFactoryDecorator::createListFromChoices()

ChoiceListInterface createListFromChoices(array|Traversable $choices, null|callable $value = null)

Creates a choice list for the given choices.

The choices should be passed in the values of the choices array.

Optionally, a callable can be passed for generating the choice values. The callable receives the choice as first and the array key as the second argument.

Parameters

array|Traversable $choices The choices
null|callable $value The callable generating the choice values

Return Value

ChoiceListInterface The choice list
doc_Symfony
2016-10-28 06:08:16
Comments
Leave a Comment

Please login to continue.