Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface
Contains choices that can be selected in a form field.
Each choice has three different properties:
- Choice: The choice that should be returned to the application by the
choice field. Can be any scalar value or an object, but no
array.
- Label: A text representing the choice that is displayed to the user.
- Value: A uniquely identifying value that can contain arbitrary
characters, but no arrays or objects. This value is displayed
in the HTML "value" attribute.
- Author: Bernhard Schussek <bschussek@gmail.com>
Synopsis
interface ChoiceListInterface
{
- // methods
- public array getChoices()
- public array getValues()
- public array getPreferredViews()
- public array getRemainingViews()
- public array getChoicesForValues()
- public array getValuesForChoices()
- public array getIndicesForChoices()
- public array getIndicesForValues()
Methods
public
- getChoices() — Returns the list of choices
- getChoicesForValues() — Returns the choices corresponding to the given values.
- getIndicesForChoices() — Returns the indices corresponding to the given choices.
- getIndicesForValues() — Returns the indices corresponding to the given values.
- getPreferredViews() — Returns the choice views of the preferred choices as nested array with the choice groups as top-level keys.
- getRemainingViews() — Returns the choice views of the choices that are not preferred as nested array with the choice groups as top-level keys.
- getValues() — Returns the values for the choices
- getValuesForChoices() — Returns the values corresponding to the given choices.