Commit c4806b4f authored by Tobias Munk's avatar Tobias Munk

added properties to control index view

parent 47d79512
......@@ -165,6 +165,10 @@ class BatchController extends Controller
public $crudTemplate = 'default';
public $crudIndexWidgetType = 'grid';
public $crudIndexGridClass = 'yii\\grid\\GridView';
/**
* @var bool indicates whether to generate ActiveQuery for the ActiveRecord class
*/
......@@ -380,6 +384,8 @@ class BatchController extends Controller
'baseTraits' => $this->crudBaseTraits,
'tidyOutput' => $this->crudTidyOutput,
'template' => $this->crudTemplate,
'indexWidgetType' => $this->crudIndexWidgetType,
'indexGridClass' => $this->crudIndexGridClass,
];
$route = 'gii/giiant-crud';
$app = \Yii::$app;
......
......@@ -131,6 +131,8 @@ class Generator extends \yii\gii\generators\crud\Generator
public $moduleNs;
public $migrationClass;
public $indexGridClass = 'yii\\grid\\GridView';
private $_p = [];
/**
......
......@@ -32,7 +32,7 @@ echo "<?php\n";
use yii\helpers\Html;
use yii\helpers\Url;
use <?= $generator->indexWidgetType === 'grid' ? 'yii\\grid\\GridView' : 'yii\\widgets\\ListView' ?>;
use <?= $generator->indexWidgetType === 'grid' ? $generator->indexGridClass : 'yii\\widgets\\ListView' ?>;
/**
* @var yii\web\View $this
......
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