You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
591 B
29 lines
591 B
<?php |
|
/** |
|
* This is the template for generating a module class file. |
|
* |
|
* @var yii\base\View $this |
|
* @var yii\gii\generators\module\Generator $generator |
|
*/ |
|
$className = $generator->moduleClass; |
|
$pos = strrpos($className, '\\'); |
|
$ns = ltrim(substr($className, 0, $pos), '\\'); |
|
$className = substr($className, $pos + 1); |
|
|
|
echo "<?php\n"; |
|
?> |
|
|
|
namespace <?= $ns ?>; |
|
|
|
|
|
class <?= $className ?> extends \yii\base\Module |
|
{ |
|
public $controllerNamespace = '<?= $generator->getControllerNamespace() ?>'; |
|
|
|
public function init() |
|
{ |
|
parent::init(); |
|
|
|
// custom initialization code goes here |
|
} |
|
}
|
|
|