Commit 115487a8 by Alexander Makarov

Fixes #1133: gii controller generator now uses application controllerNamespace…

Fixes #1133: gii controller generator now uses application controllerNamespace as default value for "Controller Namespace"
parent cc4307d1
......@@ -31,7 +31,7 @@ class Generator extends \yii\gii\Generator
/**
* @var string the namespace of the controller class
*/
public $ns = 'app\controllers';
public $ns;
/**
* @var string list of action IDs separated by commas or spaces
*/
......@@ -40,6 +40,15 @@ class Generator extends \yii\gii\Generator
/**
* @inheritdoc
*/
public function init()
{
parent::init();
$this->ns = \Yii::$app->controllerNamespace;
}
/**
* @inheritdoc
*/
public function getName()
{
return 'Controller Generator';
......
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