Core\DataTransformer\BooleanToStringTransformer (Component\Form\Extension)
Symfony\Component\Form\Extension\Core\DataTransformer\BooleanToStringTransformer
class BooleanToStringTransformer implements DataTransformerInterface
Transforms between a Boolean and a string.
Methods
__construct(string $trueValue) Sets the value emitted upon transform if the input is true. | ||
string | transform(bool $value) Transforms a Boolean into a string. | |
bool | reverseTransform(string $value) Transforms a string into a Boolean. |
Details
public __construct(string $trueValue)
Sets the value emitted upon transform if the input is true.
public string transform(bool $value)
Transforms a Boolean into a string.
public bool reverseTransform(string $value)
Transforms a string into a Boolean.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Form/Extension/Core/DataTransformer/BooleanToStringTransformer.html