Example #1
0
 /**
  * @inheritdoc
  */
 public function afterSave($insert, $changedAttributes)
 {
     parent::afterSave($insert, $changedAttributes);
     if ($insert) {
         Question::incrementAnswers($this->question_id);
     }
 }
Example #2
0
 /**
  * This is invoked after the record is saved.
  * @inheritdoc
  */
 public function afterSave($insert, $changedAttributes)
 {
     parent::afterSave($insert, $changedAttributes);
     Tag::updateFrequency($this->_oldTags, $this->tags);
 }