示例#1
0
 /**
  * Since Validate tests to make sure certain fields have values, populate requirements here such as the modified timestamp
  * @return boolean from parent
  */
 protected function beforeValidate()
 {
     if ($this->isNewRecord) {
         $this->created = new CDbExpression('NOW()');
     }
     $this->modified = new CDbExpression('NOW()');
     if (empty($this->helper_text)) {
         $this->helper_text = ' ';
     }
     return parent::beforeValidate();
 }