class ChoiceListView
Represents a choice list in templates.
A choice list contains choices and optionally preferred choices which are displayed in the very beginning of the list. Both choices and preferred choices may be grouped in {@link ChoiceGroupView} instances.
$choices | |||
$preferredChoices |
__construct(array $choices = array(), array $preferredChoices = array()) Creates a new choice list view. | ||
bool | hasPlaceholder() Returns whether a placeholder is in the choices. |
Creates a new choice list view.
array | $choices | The choice views |
array | $preferredChoices | the preferred choice views |
Returns whether a placeholder is in the choices.
A placeholder must be the first child element, not be in a group and have an empty value.
bool |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Form/ChoiceList/View/ChoiceListView.html