PHP Class Tetranz\Select2EntityBundle\Form\DataTransformer\EntitiesToPropertyTransformer

Class EntitiesToPropertyTransformer
Inheritance: implements Symfony\Component\Form\DataTransformerInterface
Show file Open project: tetranz/select2entity-bundle

Protected Properties

Property Type Description
$className string
$em Doctrine\Common\Persistence\ObjectManager
$newTaxPrefix string
$primaryKey string
$textProperty string

Public Methods

Method Description
__construct ( Doctrine\Common\Persistence\ObjectManager $em, string $class, string | null $textProperty = null, string $primaryKey = 'id', string $newTagPrefix = '__' )
reverseTransform ( array $values ) : array Transform array to a collection of entities
transform ( mixed $entities ) : array Transform initial entities to array

Method Details

__construct() public method

public __construct ( Doctrine\Common\Persistence\ObjectManager $em, string $class, string | null $textProperty = null, string $primaryKey = 'id', string $newTagPrefix = '__' )
$em Doctrine\Common\Persistence\ObjectManager
$class string
$textProperty string | null
$primaryKey string
$newTagPrefix string

reverseTransform() public method

Transform array to a collection of entities
public reverseTransform ( array $values ) : array
$values array
return array

transform() public method

Transform initial entities to array
public transform ( mixed $entities ) : array
$entities mixed
return array

Property Details

$className protected property

protected string $className
return string

$em protected property

protected ObjectManager,Doctrine\Common\Persistence $em
return Doctrine\Common\Persistence\ObjectManager

$newTaxPrefix protected property

protected string $newTaxPrefix
return string

$primaryKey protected property

protected string $primaryKey
return string

$textProperty protected property

protected string $textProperty
return string