Skip to content

Commit

Permalink
1.0.0.alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Apr 15, 2016
1 parent 56b0f30 commit 12ce200
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
]
]
],

/*'urlManager' => [
'rules' => [
'search' => 'cmsSearch/result',
]
]*/
],

'modules' =>
Expand Down
34 changes: 34 additions & 0 deletions controllers/ResultController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/**
* @author Semenov Alexander <[email protected]>
* @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);
}
}

0 comments on commit 12ce200

Please sign in to comment.