class RadioListMapper implements DataMapperInterface

Maps choices to/from radio forms.

A {@link ChoiceListInterface} implementation is used to find the corresponding string values for the choices. The radio form whose "value" option corresponds to the selected value is marked as selected.

Methods

mapDataToForms($choice, $radios)

Maps properties of some data to a list of forms.

mapFormsToData($radios, $choice)

Maps the data of a list of forms into the properties of some data.

Details

mapDataToForms($choice, $radios)

Maps properties of some data to a list of forms.

Parameters

$choice
$radios

Exceptions

UnexpectedTypeException if the type of the data parameter is not supported

mapFormsToData($radios, $choice)

Maps the data of a list of forms into the properties of some data.

Parameters

$radios
$choice

Exceptions

UnexpectedTypeException if the type of the data parameter is not supported