public static function suggestContent() { if (isset($_GET['q']) && ($keyword = trim($_GET['q'])) !== '') { $type = isset($_GET['type']) ? trim($_GET['type']) : ''; $tags = Object::model()->suggestContent($keyword, $type); if ($tags !== array()) { echo implode("\n", $tags); } } }
public function actionSuggestContent() { ContentList::suggestContent(); }