class EntityChoiceList extends ObjectChoiceList
deprecated
Deprecated since Symfony 2.7, to be removed in Symfony 3.0. Use {@link DoctrineChoiceLoader} instead.
A choice list presenting a list of Doctrine entities as choices.
Methods
__construct(ObjectManager $manager, string $class, string $labelPath = null, EntityLoaderInterface $entityLoader = null, array|Traversable|null $entities = null, array $preferredEntities = array(), string $groupPath = null, PropertyAccessorInterface $propertyAccessor = null) Creates a new entity choice list. | ||
array | getChoices() Returns the list of entities. | |
array | getValues() Returns the values for the entities. | |
array | getPreferredViews() Returns the choice views of the preferred choices as nested array with the choice groups as top-level keys. | |
array | getRemainingViews() Returns the choice views of the choices that are not preferred as nested array with the choice groups as top-level keys. | |
array | getChoicesForValues(array $values) Returns the entities corresponding to the given values. | |
array | getValuesForChoices(array $entities) Returns the values corresponding to the given entities. | |
array | getIndicesForChoices(array $entities) deprecated Returns the indices corresponding to the given entities. | |
array | getIndicesForValues(array $values) deprecated Returns the entities corresponding to the given values. |
Details
__construct(ObjectManager $manager, string $class, string $labelPath = null, EntityLoaderInterface $entityLoader = null, array|Traversable|null $entities = null, array $preferredEntities = array(), string $groupPath = null, PropertyAccessorInterface $propertyAccessor = null)
Creates a new entity choice list.
array getChoices()
Returns the list of entities.
array getValues()
Returns the values for the entities.
array getPreferredViews()
Returns the choice views of the preferred choices as nested array with the choice groups as top-level keys.
array getRemainingViews()
Returns the choice views of the choices that are not preferred as nested array with the choice groups as top-level keys.
array getChoicesForValues(array $values)
Returns the entities corresponding to the given values.
array getValuesForChoices(array $entities)
Returns the values corresponding to the given entities.
array getIndicesForChoices(array $entities) deprecated
deprecated
since version 2.4, to be removed in 3.0.Returns the indices corresponding to the given entities.
array getIndicesForValues(array $values) deprecated
deprecated
since version 2.4, to be removed in 3.0.Returns the entities corresponding to the given values.
Please login to continue.