Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToBooleanArrayTransformer::transform
Transforms an array of choices to a format appropriate for the nested checkboxes/radio buttons.
The result is an array with the options as keys and true/false as values, depending on whether a given option is selected. If this field is rendered as select tag, the value is not modified.
Signature
public function transform(mixed
$array )
Parameters
$array
— mixed- An array
Returns
- mixed
- An array
Errors/Exceptions
-
TransformationFailedException
- If the given value is not an array