replaced usages of $_GET with Request::queryParams

This commit is contained in:
Carsten Brandt
2014-01-21 15:13:51 +01:00
parent 0d669f5e6b
commit e7e6bee928
3 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ class Nav extends Widget
$this->route = Yii::$app->controller->getRoute(); $this->route = Yii::$app->controller->getRoute();
} }
if ($this->params === null) { if ($this->params === null) {
$this->params = $_GET; $this->params = Yii::$app->request->getQueryParams();
} }
Html::addCssClass($this->options, 'nav'); Html::addCssClass($this->options, 'nav');
} }

View File

@ -59,7 +59,7 @@ class <?= $controllerClass ?> extends <?= StringHelper::basename($generator->bas
public function actionIndex() public function actionIndex()
{ {
$searchModel = new <?= isset($searchModelAlias) ? $searchModelAlias : $searchModelClass ?>; $searchModel = new <?= isset($searchModelAlias) ? $searchModelAlias : $searchModelClass ?>;
$dataProvider = $searchModel->search($_GET); $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
return $this->render('index', [ return $this->render('index', [
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,

View File

@ -158,7 +158,7 @@ class Menu extends Widget
$this->route = Yii::$app->controller->getRoute(); $this->route = Yii::$app->controller->getRoute();
} }
if ($this->params === null) { if ($this->params === null) {
$this->params = $_GET; $this->params = Yii::$app->request->getQueryParams();
} }
$items = $this->normalizeItems($this->items, $hasActiveChild); $items = $this->normalizeItems($this->items, $hasActiveChild);
$options = $this->options; $options = $this->options;