Controllers
[ class tree: Controllers ] [ index: Controllers ] [ all elements ]

Source for file mainScreen.php

Documentation is available at mainScreen.php

  1. <?php
  2. /**
  3.  * <b>Class Description</b>: This is the parent class for every controller that is connected to a main application
  4.  * window, displaying the Main System Menu and Application Name on top
  5.  * 
  6.  * Created On: 29/04/2009
  7.  * @author Jan van der Breggen
  8.  * @package Controllers
  9.  * @subpackage ParentClasses
  10.  ***/
  11.  
  12. Class MainScreen extends Controller
  13. {
  14.  
  15.     /**
  16.      * we can't implement a standard constructor as the constructor will be automatically
  17.      * called at object creation time, which for controllers is during execution of the
  18.      * framework core code, at which time no parameters will be passed in which could have
  19.      * unwanted consequences
  20.      *
  21.      * @param unknown_type $header 
  22.      * @param unknown_type $text 
  23.      * @param array $displayMenu containing names of menue items that must be disabled.
  24.      * @param unknown_type $disabledMenuItems 
  25.      */
  26.     function _init($header=''$text=''$displayMenu true$disabledMenuItems '')
  27.     {
  28.         
  29.         $dbase new model_students();
  30.         
  31.         if ($displayMenu){
  32.             $menu   $this->applyAccessRestrictionsToMenuArray(
  33.             $this->convertConfigFileToArray('mainScreenMenu.txt'));
  34.             if (!empty($disabledMenuItems)){
  35.                 foreach($disabledMenuItems as $item)
  36.                 {
  37.                     $menu[$item]='';
  38.                 }
  39.             }
  40.  
  41.             if (!isset($_SESSION['rvtwo']['selected_student']))
  42.             {
  43.                 $menu['main_booking']='';
  44.             }
  45.  
  46.             $this->View['mainMenu']$this->makeLanguageMenuArray($menu);
  47.         }
  48.         $this->viewTemplate = 'view_template_mainscreen';
  49.         $this->View['text'$text;
  50.         $this->View['header'$header;
  51.         $this->View['URL_DOC'URL_DOC;
  52.         
  53.     }
  54.  
  55.     
  56. }
  57. ?>

Documentation generated on Mon, 18 May 2009 11:22:07 +0200 by phpDocumentor 1.4.1