public loadPostData ( $key, $values ) : boolean | ||
return | boolean | whether the data of the control has been changed |
public function loadPostData($key, $values)
{
$uniqueGroupName = $this->getUniqueGroupName();
$value = isset($values[$uniqueGroupName]) ? $values[$uniqueGroupName] : null;
if ($value !== null && $value === $this->getValueAttribute()) {
if (!$this->getChecked()) {
$this->setChecked(true);
return true;
} else {
return false;
}
} else {
if ($this->getChecked()) {
$this->setChecked(false);
}
}
return false;
}