ChoicesToValuesTransformer
class ChoicesToValuesTransformer implements DataTransformerInterface
Methods
__construct(ChoiceListInterface $choiceList) | ||
mixed | transform($array) | |
mixed | reverseTransform($array) |
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 |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.html