From d2a659f966c7227c4e06759ec2876211391ae5b1 Mon Sep 17 00:00:00 2001 From: Elias Luhr Date: Thu, 20 Jan 2022 15:33:42 +0100 Subject: [PATCH] Grid max columns --- src/commands/BatchController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/commands/BatchController.php b/src/commands/BatchController.php index 844c4af..338bd1f 100644 --- a/src/commands/BatchController.php +++ b/src/commands/BatchController.php @@ -274,6 +274,11 @@ class BatchController extends Controller */ public $crudFixOutput = false; + /** + * @var int maximum number of columns to show in grid + */ + public $crudGridMaxColumns = 8; + /** * @var string the namespace of the ActiveQuery class to be generated */ @@ -523,7 +528,6 @@ public function actionCruds() 'overwriteSearchModelClass' => $this->crudOverwriteSearchModelClass, 'overwriteRestControllerClass' => $this->crudOverwriteRestControllerClass, 'overwriteControllerClass' => $this->crudOverwriteControllerClass, - 'template' => $this->template, 'modelClass' => $this->modelNamespace . '\\' . $name, 'searchModelClass' => $this->crudSearchModelNamespace . '\\' . $name . $this->crudSearchModelSuffix, 'controllerNs' => $this->crudControllerNamespace, @@ -549,7 +553,8 @@ public function actionCruds() 'formLayout' => $this->crudFormLayout, 'generateAccessFilterMigrations' => $this->generateAccessFilterMigrations, 'actionButtonColumnPosition' => $this->crudActionButtonColumnPosition, - 'disablePluralization' => $this->disablePluralization + 'disablePluralization' => $this->disablePluralization, + 'gridMaxColumns' => $this->crudGridMaxColumns ]; $route = 'gii/giiant-crud'; $app = \Yii::$app;