Exemple #1
0
 /**
 * Show a module and its parts.
 */
 public function View($module)
 {
     if ($module != 'Origin') {
         if (!preg_match('/^C[a-zA-Z]+$/', $module)) {
             throw new Exception('Invalid characters in module name.');
         }
     }
     $modules = new CMModules();
     $controllers = $modules->AvailableControllers();
     $allModules = $modules->ReadAndAnalyse();
     $aModule = $modules->ReadAndAnalyseModule($module);
     $this->views->SetTitle('Manage Modules')->AddInclude(__DIR__ . '/view.tpl.php', array('module' => $aModule), 'primary')->AddInclude(__DIR__ . '/sidebar.tpl.php', array('modules' => $allModules), 'sidebar');
 }
Exemple #2
0
 /**
 * Implementing interface IController. All controllers must have an index action.
 */
 public function Index()
 {
     $modules = new CMModules();
     $controllers = $modules->AvailableControllers();
     $this->views->SetTitle('Index')->AddInclude(__DIR__ . '/index.tpl.php', array(), 'primary')->AddInclude(__DIR__ . '/sidebar.tpl.php', array('controllers' => $controllers), 'sidebar');
 }