示例#1
0
文件: Page.php 项目: ngdvan/lntguitar
 public function beforeSave()
 {
     if ($this->isNewRecord) {
         $this->create_time = $this->update_time = time();
         $this->user_id = Yii::app()->user->id;
     } else {
         $this->update_time = time();
     }
     return parent::beforeSave();
 }