diff --git a/config/main.php b/config/main.php index 7a833a9..3e04a03 100644 --- a/config/main.php +++ b/config/main.php @@ -19,6 +19,12 @@ ] ] ], + + /*'urlManager' => [ + 'rules' => [ + 'search' => 'cmsSearch/result', + ] + ]*/ ], 'modules' => diff --git a/controllers/ResultController.php b/controllers/ResultController.php new file mode 100644 index 0000000..e00b383 --- /dev/null +++ b/controllers/ResultController.php @@ -0,0 +1,34 @@ + + * @link http://skeeks.com/ + * @copyright 2010 SkeekS (СкикС) + * @date 15.04.2016 + */ +namespace skeeks\cms\search\controllers; + +use skeeks\cms\base\Controller; +use skeeks\cms\helpers\StringHelper; +use skeeks\cms\search\models\CmsContentElement; +use skeeks\cms\search\models\CmsSearchPhrase; +use skeeks\cms\models\Tree; +use Yii; +use yii\web\Response; + +/** + * Class SearchController + * @package skeeks\cms\controllers + */ +class ResultController extends Controller +{ + /** + * @return string + */ + public function actionIndex() + { + $searchQuery = \Yii::$app->cmsSearch->searchQuery; + $this->view->title = StringHelper::ucfirst($searchQuery) . " — результаты поиска"; + + return $this->render($this->action->id); + } +}