Commit 115487a8 authored by Alexander Makarov's avatar 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,12 +31,21 @@ class Generator extends \yii\gii\Generator ...@@ -31,12 +31,21 @@ class Generator extends \yii\gii\Generator
/** /**
* @var string the namespace of the controller class * @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 * @var string list of action IDs separated by commas or spaces
*/ */
public $actions = 'index'; public $actions = 'index';
/**
* @inheritdoc
*/
public function init()
{
parent::init();
$this->ns = \Yii::$app->controllerNamespace;
}
/** /**
* @inheritdoc * @inheritdoc
*/ */
......
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