ChoiceListInterface
createListFromLoader(ChoiceLoaderInterface $loader, null|callable $value = null)
Creates a choice list that is loaded with the given loader. 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 ChoiceLoaderInterface $loader The choice loader null|callable $value The callable generating the choice values Return Value ChoiceListInterface The choice