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 Ret