Ejemplo n.º 1
0
    public function actionGetVideoBySearchQuery() {
        if (Yii::app()->request->isAjaxRequest && isset($_POST['query'])) {

            $queryString = trim($_POST['query']);
            $options = array(

                'search_option_title' => intval($_POST['search_option_title']),
                'search_option_log_line' => intval($_POST['search_option_log_line']),
                'search_option_description' => intval($_POST['search_option_description']),
                'search_option_link_name' => intval($_POST['search_option_link_name']),
            );

            $video_list = Videos::getVideoListByQueryString($queryString, $options);

            $result['html'] = $this->renderPartial('_video', array(
                'video_list' => $video_list,
            ),true);

            echo CJSON::encode($result);


        }

    }