module.php 613 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?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 <?php echo $ns; ?>


class <?php echo $className; ?> extends \yii\web\Module
{
	public $controllerNamespace = '<?php echo $generator->getControllerNamespace(); ?>';

	public function init()
	{
		parent::init();

		// custom initialization code goes here
	}
}