/** * This is invoked after the record is deleted. */ protected function afterDelete() { parent::afterDelete(); //Comment::model()->deleteAll('post_id='.$this->id); HopamTag::model()->updateFrequency($this->tags, ''); Ban::model()->updateFrequency($this->ban_artist, ''); }
/** * Suggests tags based on the current user input. * This is called via AJAX when the user is entering the tags input. */ public function actionSuggestTags() { if (isset($_GET['q']) && ($keyword = trim($_GET['q'])) !== '') { $tags = HopamTag::model()->suggestTags($keyword); if ($tags !== array()) { echo implode("\n", $tags); } } }