demos/blog/protected/controllers/PostController.php
public function actionSuggestTags()
	{
		if(isset($_GET['q']) && ($keyword=trim($_GET['q']))!=='')
		{
			$tags=Tag::model()->suggestTags($keyword);
			if($tags!==array())
				echo implode("\n",$tags);
		}
	}
public function actionSuggestTags()
	{
		if(isset($_GET['q']) && ($keyword=trim($_GET['q']))!=='')
		{
			$tags=Tag::model()->suggestTags($keyword);
			if($tags!==array())
				echo implode("\n",$tags);
		}
	}
public function actionSuggestTags ( ) { if ( isset ( $ _GET [ 'q' ] ) && ( $ keyword = trim ( $ _GET [ 'q' ] ) ) !== '' ) { $ tags = Tag :: model ( ) -> suggestTags ( $ keyword ) ; if ( $ tags !== array ( ) ) echo implode ( "\n" , $ tags ) ; } }
Suggests tags based on the current user input.
This is called via AJAX when the user is entering the tags input.
Suggests tags based on the current user input . This is called via AJAX when the user is entering the tags input .