Commit a2e25bf1 by Alexander Makarov

Merge pull request #3739 from umneeq/gii-codestyle-fixes-2

Fix Gii template variables order
parents 09e6a13e c9f79a2c
...@@ -68,8 +68,8 @@ class <?= $controllerClass ?> extends <?= StringHelper::basename($generator->bas ...@@ -68,8 +68,8 @@ class <?= $controllerClass ?> extends <?= StringHelper::basename($generator->bas
$dataProvider = $searchModel->search(Yii::$app->request->getQueryParams()); $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
return $this->render('index', [ return $this->render('index', [
'dataProvider' => $dataProvider,
'searchModel' => $searchModel, 'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]); ]);
<?php else: ?> <?php else: ?>
$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
......
...@@ -19,8 +19,8 @@ use <?= $generator->indexWidgetType === 'grid' ? "yii\\grid\\GridView" : "yii\\w ...@@ -19,8 +19,8 @@ use <?= $generator->indexWidgetType === 'grid' ? "yii\\grid\\GridView" : "yii\\w
/** /**
* @var yii\web\View $this * @var yii\web\View $this
* @var yii\data\ActiveDataProvider $dataProvider
<?= !empty($generator->searchModelClass) ? " * @var " . ltrim($generator->searchModelClass, '\\') . " \$searchModel\n" : '' ?> <?= !empty($generator->searchModelClass) ? " * @var " . ltrim($generator->searchModelClass, '\\') . " \$searchModel\n" : '' ?>
* @var yii\data\ActiveDataProvider $dataProvider
*/ */
$this->title = <?= $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>; $this->title = <?= $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment