Example #1
0
 /**
  * Before save operations
  */
 public function beforeSave()
 {
     if ($this->isNewRecord) {
         $this->posted = time();
         $this->userid = Yii::app()->user->id;
     }
     return parent::beforeSave();
 }
Example #2
0
 /**
  * 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();
 }
Example #3
0
 /**
  * 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();
 }
Example #4
0
 /**
  * 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();
 }
Example #5
0
 /**
  * Before save operations
  */
 public function beforeSave()
 {
     // Create the alias out of the title
     $this->alias = Yii::app()->func->makeAlias($this->title);
     return parent::beforeSave();
 }