Skip to content

Commit

Permalink
Merge branch 'feature/max-columns' into feature/wedding-2023-04
Browse files Browse the repository at this point in the history
  • Loading branch information
schmunk42 committed Apr 12, 2023
2 parents 212709b + e6db624 commit 8ff455c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/commands/BatchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ class BatchController extends Controller
*/
public $crudFixOutput = false;

/**
* @var integer number of grid columns in crud generator
*/
public $crudGridMaxColumns = 8;

/**
* @var string the namespace of the ActiveQuery class to be generated
*/
Expand Down Expand Up @@ -528,6 +533,7 @@ public function actionCruds()
'indexWidgetType' => $this->crudIndexWidgetType,
'indexGridClass' => $this->crudIndexGridClass,
'formLayout' => $this->crudFormLayout,
'gridMaxColumns' => $this->crudGridMaxColumns,
'generateAccessFilterMigrations' => $this->generateAccessFilterMigrations,
'actionButtonColumnPosition' => $this->crudActionButtonColumnPosition,
];
Expand Down
2 changes: 1 addition & 1 deletion src/generators/model/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function generateClassName($tableName, $useSchemaName = null)
$patterns[] = "/^{$db->tablePrefix}(.*?)$/";
$patterns[] = "/^(.*?){$db->tablePrefix}$/";

if (strpos($this->tableName, '*') !== false) {
if (strpos((string)$this->tableName, '*') !== false) {
$pattern = $this->tableName;
if (($pos = strrpos($pattern, '.')) !== false) {
$pattern = substr($pattern, $pos + 1);
Expand Down

0 comments on commit 8ff455c

Please sign in to comment.