O2oModule.php 469 B

123456789101112131415161718192021222324
  1. <?php
  2. class O2oModule extends CWebModule
  3. {
  4. public function init()
  5. {
  6. $this->setImport(array(
  7. 'o2o.controllers.*',
  8. 'o2o.components.*',
  9. ));
  10. }
  11. public function beforeControllerAction($controller, $action)
  12. {
  13. $controller->layout = '//layouts/o2o';
  14. if(parent::beforeControllerAction($controller, $action))
  15. {
  16. return true;
  17. }
  18. else
  19. return false;
  20. }
  21. }