PHP Class Symfony\Bridge\Doctrine\Form\DataTransformer\EntitiesToArrayTransformer

Inheritance: implements Symfony\Component\Form\DataTransformerInterface
Afficher le fichier Open project: pmjones/php-framework-benchmarks

Méthodes publiques

Méthode Description
__construct ( EntityChoiceList $choiceList )
reverseTransform ( mixed $keys ) : Doctrine\Common\Collections\Collection | object Transforms choice keys into entities
transform ( Doctrine\Common\Collections\Collection | object $collection ) : mixed Transforms entities into choice keys

Method Details

__construct() public méthode

public __construct ( EntityChoiceList $choiceList )
$choiceList Symfony\Bridge\Doctrine\Form\ChoiceList\EntityChoiceList

reverseTransform() public méthode

Transforms choice keys into entities
public reverseTransform ( mixed $keys ) : Doctrine\Common\Collections\Collection | object
$keys mixed An array of keys, a single key or NULL
Résultat Doctrine\Common\Collections\Collection | object A collection of entities, a single entity or NULL

transform() public méthode

Transforms entities into choice keys
public transform ( Doctrine\Common\Collections\Collection | object $collection ) : mixed
$collection Doctrine\Common\Collections\Collection | object A collection of entities, a single entity or NULL
Résultat mixed An array of choice keys, a single key or NULL