/** * 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); } } }
public function normalizeTags($attribute, $params) { $this->ban_artist = SongBans::array2string(array_unique(HopamTag::string2array($this->tags))); }