ChoicesToValuesTransformer

class ChoicesToValuesTransformer implements DataTransformerInterface

Methods

__construct(ChoiceListInterface $choiceList)

Constructor.

mixed transform(array $array)
mixed reverseTransform(array $array)

Details

__construct(ChoiceListInterface $choiceList)

Constructor.

Parameters

ChoiceListInterface $choiceList

mixed transform(array $array)

Parameters

array $array

Return Value

mixed The value in the transformed representation

Exceptions

TransformationFailedException If the given value is not an array.

mixed reverseTransform(array $array)

Parameters

array $array

Return Value

mixed The value in the original representation

Exceptions

TransformationFailedException If the given value is not an array or if no matching choice could be found for some given value.
doc_Symfony
2016-10-28 06:08:44
Comments
Leave a Comment

Please login to continue.