Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
4230f766
Commit
4230f766
authored
Apr 29, 2014
by
suralc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #3265
Adding a new additional validation rule in the gii-crud generator enforcing the expected format.
parent
d63613b6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Generator.php
extensions/gii/generators/crud/Generator.php
+3
-1
No files found.
extensions/gii/generators/crud/Generator.php
View file @
4230f766
...
@@ -67,6 +67,7 @@ class Generator extends \yii\gii\Generator
...
@@ -67,6 +67,7 @@ class Generator extends \yii\gii\Generator
[[
'modelClass'
],
'validateClass'
,
'params'
=>
[
'extends'
=>
BaseActiveRecord
::
className
()]],
[[
'modelClass'
],
'validateClass'
,
'params'
=>
[
'extends'
=>
BaseActiveRecord
::
className
()]],
[[
'baseControllerClass'
],
'validateClass'
,
'params'
=>
[
'extends'
=>
Controller
::
className
()]],
[[
'baseControllerClass'
],
'validateClass'
,
'params'
=>
[
'extends'
=>
Controller
::
className
()]],
[[
'controllerClass'
],
'match'
,
'pattern'
=>
'/Controller$/'
,
'message'
=>
'Controller class name must be suffixed with "Controller".'
],
[[
'controllerClass'
],
'match'
,
'pattern'
=>
'/Controller$/'
,
'message'
=>
'Controller class name must be suffixed with "Controller".'
],
[[
'controllerClass'
],
'match'
,
'pattern'
=>
'/[A-Z0-9][^\\]+Controller$/'
,
'message'
=>
'Controller class name must start with an uppercase letter.'
],
[[
'controllerClass'
,
'searchModelClass'
],
'validateNewClass'
],
[[
'controllerClass'
,
'searchModelClass'
],
'validateNewClass'
],
[[
'indexWidgetType'
],
'in'
,
'range'
=>
[
'grid'
,
'list'
]],
[[
'indexWidgetType'
],
'in'
,
'range'
=>
[
'grid'
,
'list'
]],
[[
'modelClass'
],
'validateModelClass'
],
[[
'modelClass'
],
'validateModelClass'
],
...
@@ -100,7 +101,8 @@ class Generator extends \yii\gii\Generator
...
@@ -100,7 +101,8 @@ class Generator extends \yii\gii\Generator
'modelClass'
=>
'This is the ActiveRecord class associated with the table that CRUD will be built upon.
'modelClass'
=>
'This is the ActiveRecord class associated with the table that CRUD will be built upon.
You should provide a fully qualified class name, e.g., <code>app\models\Post</code>.'
,
You should provide a fully qualified class name, e.g., <code>app\models\Post</code>.'
,
'controllerClass'
=>
'This is the name of the controller class to be generated. You should
'controllerClass'
=>
'This is the name of the controller class to be generated. You should
provide a fully qualified namespaced class, .e.g, <code>app\controllers\PostController</code>.'
,
provide a fully qualified namespaced class, .e.g, <code>app\controllers\PostController</code>.
The controller class name should follow the CamelCase scheme with an uppercase first letter'
,
'baseControllerClass'
=>
'This is the class that the new CRUD controller class will extend from.
'baseControllerClass'
=>
'This is the class that the new CRUD controller class will extend from.
You should provide a fully qualified class name, e.g., <code>yii\web\Controller</code>.'
,
You should provide a fully qualified class name, e.g., <code>yii\web\Controller</code>.'
,
'moduleID'
=>
'This is the ID of the module that the generated controller will belong to.
'moduleID'
=>
'This is the ID of the module that the generated controller will belong to.
...
...
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