mediatekformation

DoctrineChoiceLoader
in package
implements ChoiceLoaderInterface

Loads choices using a Doctrine object manager.

Tags
author

Bernhard Schussek bschussek@gmail.com

Interfaces, Classes, Traits and Enums

ChoiceLoaderInterface
Loads a choice list.

Table of Contents

$choiceList  : ChoiceListInterface
$class  : mixed
$idReader  : mixed
$manager  : mixed
$objectLoader  : mixed
__construct()  : mixed
Creates a new choice loader.
loadChoiceList()  : ChoiceListInterface
Loads a list of choices.
loadChoicesForValues()  : array<string|int, mixed>
Loads the choices corresponding to the given values.
loadValuesForChoices()  : array<string|int, string>
Loads the values corresponding to the given choices.

Properties

Methods

__construct()

Creates a new choice loader.

public __construct(ObjectManager $manager, string $class[, IdReader $idReader = null ][, EntityLoaderInterface $objectLoader = null ]) : mixed

Optionally, an implementation of can be passed which optimizes the object loading for one of the Doctrine mapper implementations.

Parameters
$manager : ObjectManager
$class : string

The class name of the loaded objects

$idReader : IdReader = null
$objectLoader : EntityLoaderInterface = null
Return values
mixed

loadChoicesForValues()

Loads the choices corresponding to the given values.

public loadChoicesForValues(array<string|int, mixed> $values[, mixed $value = null ]) : array<string|int, mixed>
Parameters
$values : array<string|int, mixed>

An array of choice values. Non-existing values in this array are ignored

$value : mixed = null

The callable generating the choice values

Return values
array<string|int, mixed>

An array of choices

loadValuesForChoices()

Loads the values corresponding to the given choices.

public loadValuesForChoices(array<string|int, mixed> $choices[, mixed $value = null ]) : array<string|int, string>
Parameters
$choices : array<string|int, mixed>

An array of choices. Non-existing choices in this array are ignored

$value : mixed = null

The callable generating the choice values

Return values
array<string|int, string>

An array of choice values

Search results