示例#1
0
 /**
  * Show a module and its parts.
  */
 public function View($module)
 {
     //if(!preg_match('/^C[a-zA-Z]+$/', $module)) {throw new Exception('Invalid characters in module name.');}
     $modules = new ModulesModel();
     $controllers = $modules->AvailableControllers();
     $allModules = $modules->ReadAndAnalyse();
     $aModule = $modules->ReadAndAnalyseModule($module);
     $this->views->SetTitle('Manage Modules')->AddInclude(HAL_INSTALL_PATH . '/view/modulesview.tpl.php', array('module' => $aModule), 'primary')->AddInclude(HAL_INSTALL_PATH . '/view/modulessidebar.tpl.php', array('modules' => $allModules), 'sidebar');
 }
 public function actionAjaxGet()
 {
     $type = $_POST['type'];
     $tree = array();
     if ($type == 'core') {
         $view = '_ajaxGetCore';
         $tree = $this->getArray(Yii::getPathOfAlias(self::PATH_APP));
     } else {
         $view = '_ajaxGetModules';
         $tree = ModulesModel::getModules();
     }
     $this->render($view, array('tree' => $tree));
 }
示例#3
0
 public function run()
 {
     $model = ModulesModel::model()->site()->enabled()->findAll();
     $this->render($this->skin, array('model' => $model));
 }
示例#4
0
 /**
  * Implementing interface IController. All controllers must have an index action.
  */
 public function Index()
 {
     $modules = new ModulesModel();
     $controllers = $modules->AvailableControllers();
     $this->views->SetTitle('Index')->AddInclude(HAL_INSTALL_PATH . '/view/index.tpl.php', array(), 'primary')->AddInclude(HAL_INSTALL_PATH . '/view/indexsidebar.tpl.php', array('controllers' => $controllers), 'sidebar');
 }