PHP Класс Symfony\Bundle\DoctrineBundle\Form\ValueTransformer\CollectionToStringTransformer

Use-Cases for this transformer include: List of Tag-Names, List Of Group/User-Names or the like. This transformer only makes sense if you know the list of related collections to be small and that they have a unique identifier field that is of meaning to the user (Tag Names) and is enforced to be unique in the storage. This transformer can cause the following SQL operations to happen in the case of an ORM collection: 1. Initialize the whole collection using one SELECT query 2. For each removed element issue an UPDATE or DELETE stmt (depending on one-to-many or many-to-many) 3. For each inserted element issue an INSERT or UPDATE stmt (depending on one-to-many or many-to-many) 4. Extra updates if necessary by the ORM.
Автор: Benjamin Eberlei ([email protected])
Наследование: extends Symfony\Component\Form\ValueTransformer\BaseValueTransformer
Показать файл Открыть проект

Открытые методы

Метод Описание
reverseTransform ( string $value, Doctrine\Common\Collections\Collection $collection )
transform ( Doctrine\Common\Collections\Collection $value ) : string Transform a Doctrine Collection into a string of identifies with a separator.

Защищенные методы

Метод Описание
configure ( )

Описание методов

configure() защищенный Метод

protected configure ( )

reverseTransform() публичный Метод

public reverseTransform ( string $value, Doctrine\Common\Collections\Collection $collection )
$value string
$collection Doctrine\Common\Collections\Collection

transform() публичный Метод

Transform a Doctrine Collection into a string of identifies with a separator.
public transform ( Doctrine\Common\Collections\Collection $value ) : string
$value Doctrine\Common\Collections\Collection
Результат string