Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2-giiant
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dmstr
yii2-giiant
Commits
c4806b4f
Commit
c4806b4f
authored
Sep 26, 2016
by
Tobias Munk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added properties to control index view
parent
47d79512
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
BatchController.php
src/commands/BatchController.php
+6
-0
Generator.php
src/generators/crud/Generator.php
+2
-0
index.php
src/generators/crud/default/views/index.php
+1
-1
No files found.
src/commands/BatchController.php
View file @
c4806b4f
...
...
@@ -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
;
...
...
src/generators/crud/Generator.php
View file @
c4806b4f
...
...
@@ -131,6 +131,8 @@ class Generator extends \yii\gii\generators\crud\Generator
public
$moduleNs
;
public
$migrationClass
;
public
$indexGridClass
=
'yii\\grid\\GridView'
;
private
$_p
=
[];
/**
...
...
src/generators/crud/default/views/index.php
View file @
c4806b4f
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment