ContentList::suggestContent PHP Method

suggestContent() public static method

public static suggestContent ( )
    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);
            }
        }
    }

Usage Example

 public function actionSuggestContent()
 {
     ContentList::suggestContent();
 }