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.

module.php 751B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * This is the template for generating a module class file.
  4. */
  5. /* @var $this yii\web\View */
  6. /* @var $generator yii\gii\generators\module\Generator */
  7. $className = $generator->moduleClass;
  8. $pos = strrpos($className, '\\');
  9. $ns = ltrim(substr($className, 0, $pos), '\\');
  10. $className = substr($className, $pos + 1);
  11. echo "<?php\n";
  12. ?>
  13. namespace <?= $ns ?>;
  14. /**
  15. * <?= $generator->moduleID ?> module definition class
  16. */
  17. class <?= $className ?> extends \yii\base\Module
  18. {
  19. /**
  20. * @inheritdoc
  21. */
  22. public $controllerNamespace = '<?= $generator->getControllerNamespace() ?>';
  23. /**
  24. * @inheritdoc
  25. */
  26. public function init()
  27. {
  28. parent::init();
  29. // custom initialization code goes here
  30. }
  31. }