/**
* Method to set certain otherwise inaccessible properties of the form field object.
*
* @param string $name The property name for which to set the value.
* @param mixed $value The value of the property.
*
* @return void
*
* @since 3.2
*/
public function __set($name, $value)
{
switch ($name) {
case 'height':
case 'width':
case 'assetField':
case 'authorField':
case 'asset':
$this->{$name} = (string) $value;
break;
case 'buttons':
$value = (string) $value;
if ($value === 'true' || $value === 'yes' || $value === '1') {
$this->buttons = true;
} elseif ($value === 'false' || $value === 'no' || $value === '0') {
$this->buttons = false;
} else {
$this->buttons = explode(',', $value);
}
break;
case 'hide':
$value = (string) $value;
$this->hide = $value ? explode(',', $value) : array();
break;
case 'editorType':
// Can be in the form of: editor="desired|alternative".
$this->editorType = explode('|', trim((string) $value));
break;
default:
parent::__set($name, $value);
}
}