elseif ('checkbox' ===
$this->type && true ===
$value) { // check
$this->value =
$this->options
[0
]['value'
];
} else { if (\
is_array($value)) { if (!
$this->multiple
) { throw new \
InvalidArgumentException(sprintf('The value for "%s" cannot be an array.',
$this->name
));
} foreach ($value as $v) { if (!
$this->
containsOption($v,
$this->options
)) { throw new \
InvalidArgumentException(sprintf('Input "%s" cannot take "%s" as a value (possible values: "%s").',
$this->name,
$v,
implode('", "',
$this->
availableOptionValues())));
} } } elseif (!
$this->
containsOption($value,
$this->options
)) { throw new \
InvalidArgumentException(sprintf('Input "%s" cannot take "%s" as a value (possible values: "%s").',
$this->name,
$value,
implode('", "',
$this->
availableOptionValues())));
} if ($this->multiple
) { $value =
(array) $value;
} if (\
is_array($value)) {