Exemple #1
0
 public function beforeSave()
 {
     if ($this->isNewRecord) {
         $this->creation_date = new CDbExpression('NOW()');
     }
     return parent::beforeSave();
 }
Exemple #2
0
 /**
  * Returns the static model of the specified AR class.
  * @param string $className
  * @return User the static model class
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }