public function beforeSave($insert) { if (parent::beforeSave($insert) == false) { return false; } $this->blocks = Serializer::serialize($this->blocks); return true; }
public function beforeSave($insert) { if (parent::beforeSave($insert) == false) { return false; } $this->captions = serialize($this->captions); return true; }
public function beforeSave($insert) { if (parent::beforeSave($insert) == false) { return false; } if ($insert == true) { $this->status = StatusEnum::STATUS_ON; } return true; }
public function beforeSave($insert) { if (parent::beforeSave($insert)) { if ($insert == true) { $this->used = BooleanEnum::FLASE; return true; } return true; } else { return false; } }
public function beforeSave($insert) { if (parent::beforeSave($insert) == false) { return false; } if ($insert == true) { $this->mode = 0; //0,1,2 分别代表适用于创建和解析.只能创建,只能解析 $this->encodeParams = StatusEnum::STATUS_ON; $this->status = StatusEnum::STATUS_ON; } return true; }
public function beforeSave($insert) { if (parent::beforeSave($insert)) { if ($insert == true) { $this->status = StatusEnum::STATUS_ON; } $this->updateRevision(); $this->short = StringHelper::truncate(empty($this->short) ? strip_tags($this->content) : $this->short, 200); return true; } else { return false; } }
public function beforeSave($insert) { if (parent::beforeSave($insert)) { if (empty($this->parent)) { $this->parent = 0; } if ($insert == true) { $this->status = StatusEnum::STATUS_ON; } return true; } else { return false; } }
public function afterSave($insert, $changedAttributes) { if (parent::beforeSave($insert) == false) { return false; } if ($insert == true) { $this->updateCommentTotal(); return true; } return true; }