class ChoicesToValuesTransformer implements DataTransformerInterface

Methods

__construct(ChoiceListInterface $choiceList)

No description

mixed
transform($array)

No description

mixed
reverseTransform($array)

No description

Details

__construct(ChoiceListInterface $choiceList)

Parameters

ChoiceListInterface $choiceList

mixed transform($array)

Parameters

$array

Return Value

mixed The value in the transformed representation

Exceptions

TransformationFailedException if the given value is not an array

mixed reverseTransform($array)

Parameters

$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