/** * Set valid values for object props before save * * @return void **/ protected function _validateFields() { parent::_validateFields(); $this->default = !is_null($this->default) ? 1 : 0; if (!$this->visibility_condition) { $this->visibility_condition = NULL; } }
/** * Set valid values for object props before save * * @return void **/ protected function _validateFields() { parent::_validateFields(); if (!$this->can_detail) { $this->can_detail = NULL; } if (!$this->visibility_condition) { $this->visibility_condition = NULL; } //$this->can_detail = (!is_null($this->can_detail) ? 1 : 0; }
/** * Set valid values for object props before save * * @return void **/ protected function _validateFields() { parent::_validateFields(); if (!$this->type) { $this->type = 'single'; } $this->rotation = (int) $this->rotation; if (!$this->visibility_condition) { $this->visibility_condition = NULL; } /* if (count($this->getSubanswers()) > 0) $this->type = 'tabular';*/ }