Ejemplo n.º 1
0
 /**
  * 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;
     }
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }
Ejemplo n.º 3
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';*/
 }