Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

39 lines
751B

  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. }