CheckboxListMapper

CheckboxListMapper

class CheckboxListMapper implements DataMapperInterface

Maps choices to/from checkbox forms.

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

Methods

mapDataToForms($choices, $checkboxes)

Maps properties of some data to a list of forms.

mapFormsToData($checkboxes, $choices)

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

Details

mapDataToForms($choices, $checkboxes)

Maps properties of some data to a list of forms.

Parameters

$choices
$checkboxes

Exceptions

UnexpectedTypeException if the type of the data parameter is not supported.

mapFormsToData($checkboxes, $choices)

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

Parameters

$checkboxes
$choices

Exceptions

UnexpectedTypeException if the type of the data parameter is not supported.
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部