module.php 707 B

12345678910111213141516171819202122232425262728
  1. <?php echo "<?php\n"; ?>
  2. class <?php echo $moduleClass; ?> extends CWebModule
  3. {
  4. public function init()
  5. {
  6. // this method is called when the module is being created
  7. // you may place code here to customize the module or the application
  8. // import the module-level models and components
  9. $this->setImport(array(
  10. '<?php echo $moduleID; ?>.models.*',
  11. '<?php echo $moduleID; ?>.components.*',
  12. ));
  13. }
  14. public function beforeControllerAction($controller, $action)
  15. {
  16. if(parent::beforeControllerAction($controller, $action))
  17. {
  18. // this method is called before any module controller action is performed
  19. // you may place customized code here
  20. return true;
  21. }
  22. else
  23. return false;
  24. }
  25. }