/** * Before save operations */ public function beforeSave() { if ($this->isNewRecord) { $this->posted = time(); $this->userid = Yii::app()->user->id; } return parent::beforeSave(); }
/** * Before save operations */ public function beforeSave() { if ($this->isNewRecord) { $this->created = time(); $this->userid = Yii::app()->user->id; } // Increase the revision id by 1 $this->revisionid = $this->maxPageRevision(); return parent::beforeSave(); }
/** * Before save operations */ public function beforeSave() { if ($this->isNewRecord) { $this->posted = time(); $this->reportedbyid = Yii::app()->user->id; // Create the alias out of the title $this->alias = Yii::app()->func->makeAlias($this->title); } return parent::beforeSave(); }
/** * Before save operations */ public function beforeSave() { if ($this->isNewRecord) { $this->created = time(); $this->userid = Yii::app()->user->id; $this->status = 1; } // Create the alias out of the title $this->alias = Yii::app()->func->makeAlias($this->title); return parent::beforeSave(); }
/** * Before save operations */ public function beforeSave() { // Create the alias out of the title $this->alias = Yii::app()->func->makeAlias($this->title); return parent::beforeSave(); }