/** * This is invoked after the record is saved. */ public function afterSave($insert, $changedAttributes) { parent::afterSave($insert, $changedAttributes); Tag::updateFrequency($this->_oldTags, $this->tags, strtolower($this->getClassName())); }