コード例 #1
0
ファイル: controller.php プロジェクト: Akrobate/akrocrm
 /**
  *	@brief methode appelé quand l'utilisateur est connectée
  */
 public function whenConnected()
 {
     if ($this->action != "") {
         $moduleName = ucfirst($this->module);
         $actionName = ucfirst($this->action);
         $customName = 'Modules_' . $moduleName . '_' . $actionName;
         $coreName = 'Module_' . $actionName;
         if (CoreController::controllerExists($customName)) {
             $ctrName = $customName;
         } elseif (CoreController::controllerExists($coreName)) {
             $ctrName = $coreName;
         }
         $obj = new $ctrName();
         CoreController::share($this, $obj);
         $this->assign('right', $obj->renderSTR());
     }
     $allModules = ModuleManager::getAllModules();
     $this->assign('topLinks', $allModules);
     $obj = new Sidebar_View();
     $obj->setModulesList($allModules);
     $this->assign('left', $obj->renderSTR());
     $this->assign('sidebar', true);
 }