PageRenderTime 40ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/app/controllers/utilites/menu_controller.php

https://code.google.com/
PHP | 23 lines | 16 code | 6 blank | 1 comment | 1 complexity | 9c4780c66cbfba9c8b51b06b4e7212e7 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php
  2. class MenuController extends AppController {
  3. var $name = 'menu';
  4. var $pageTitle = '';
  5. var $viewPath = 'utilities/menu';
  6. function display() {
  7. // params['form'] => 'its_return', 'customer_report', ...
  8. list($prefix, $menu) = split('_', $this->params['form']['menuId'], 2);
  9. switch ($prefix) {
  10. case 'its': $this->viewPath = 'utilities/menu/its'; break;
  11. case 'customer': $this->viewPath = 'utilities/menu/customers'; break;
  12. case 'supplier': $this->viewPath = 'utilities/menu/suppliers'; break;
  13. }
  14. $this->render($menu);
  15. }
  16. }
  17. ?>