EntityChoiceList deprecated
EntityChoiceList deprecated
class EntityChoiceList extends ObjectChoiceList
deprecated
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
Returns the indices corresponding to the given entities.
array getIndicesForValues(array $values) deprecated
deprecated
Returns the entities corresponding to the given values.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.1/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.html