コード例 #1
0
 public function beforeSave($insert)
 {
     if ($this->isNewRecord) {
         $this->create_time = time();
         // new \yii\db\Expression('NOW()');
     } else {
         $this->change_time = time();
         //new \yii\db\Expression('NOW()');
     }
     $this->content = Utils::cleanHtml($this->content);
     return parent::beforeSave($insert);
 }
コード例 #2
0
 public function beforeSave($insert)
 {
     $this->content = Utils::cleanHtml($this->content);
     return parent::beforeSave($insert);
 }