Class

Symfony\Component\Form\Extension\Core\ChoiceList\ArrayChoiceList

class ArrayChoiceList implements ChoiceListInterface

Methods

__construct(array|Closure $choices)

Constructor.

array getChoices()

Returns a list of choices

Details

at line 29
public __construct(array|Closure $choices)

Constructor.

Parameters

array|Closure $choices An array of choices or a function returning an array

Exceptions

UnexpectedTypeException if the type of the choices parameter is not supported

at line 43
public array getChoices()

Returns a list of choices

Return Value

array