Ejemplo n.º 1
0
 public function beforeSave($insert)
 {
     parent::beforeSave($insert);
     $this->url_code = \app\common\XUtils::shorturl($this->url);
     $this->description = \app\common\XUtils::ihtmlspecialchars($this->description);
     !$this->id && ($this->createtime = time());
     $this->updatetime = time();
     return true;
 }