function setDefaultValue($value) { if (!is_array($value)) { $value = $value ? array($value) : array(); } Assert::isTrue(sizeof($value) == array_intersect($this->getAvailableValues(), $value), 'trying to set the default value that is out of options range'); parent::setDefaultValue($value); }