array ( 'getSuggestionList', 'setSession' ), 'users' => array ( '*' ) ), array ( 'deny', // deny all users 'users' => array ( '*' ) ) ); } public function actionGetSuggestionList() { $prefixFilter = $_GET ['term']; // get list with all items of this field //TODO no hardcoding $listTitle = $_GET ['listTitle']; $result = FormSuggestionsQueryManager::newFacetsList ( $listTitle, $prefixFilter ); $list = array (); foreach ( $result as $attributeVal => $count ) { $list [] = array ( 'label' => $attributeVal . " (" . $count . ")", 'value' => $attributeVal ); } echo CJSON::encode ( $list ); Yii::app ()->end (); } }