Commit 9b69e2d1 by Carsten Brandt

Merge pull request #3293 from suralc/patch-4

Fix #3265
parents 340278b5 1ad5c4c3
...@@ -5,6 +5,7 @@ Yii Framework 2 gii extension Change Log ...@@ -5,6 +5,7 @@ Yii Framework 2 gii extension Change Log
-------------------------- --------------------------
- Bug #1263: Fixed the issue that Gii and Debug modules might be affected by incompatible asset manager configuration (qiangxue) - Bug #1263: Fixed the issue that Gii and Debug modules might be affected by incompatible asset manager configuration (qiangxue)
- Bug #3265: Fixed incorrect controller class name validation (suralc)
- Enh #3088: The gii module will manage their own URL rules now (qiangxue) - Enh #3088: The gii module will manage their own URL rules now (qiangxue)
- Enh #3222: Added `useTablePrefix` option to the model generator for Gii (horizons2) - Enh #3222: Added `useTablePrefix` option to the model generator for Gii (horizons2)
......
...@@ -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-Z][^\\\\]+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.
......
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