Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 public function beforeSave($insert)
 {
     $this->content = Utils::cleanHtml($this->content);
     return parent::beforeSave($insert);
 }