当前位置: 首页>>代码示例>>PHP>>正文


PHP ui::display方法代码示例

本文整理汇总了PHP中ui::display方法的典型用法代码示例。如果您正苦于以下问题:PHP ui::display方法的具体用法?PHP ui::display怎么用?PHP ui::display使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ui的用法示例。


在下文中一共展示了ui::display方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run()
 {
     require FRAMEWORK . DS . 'conf' . DS . 'dispatcher.php';
     require FRAMEWORK . DS . 'conf' . DS . 'auth.php';
     $pageid = isset($_GET['pageid']) ? $_GET['pageid'] : $defaultPageid;
     $page = $this->resolvePage($pageid);
     $pageid = $page->getId();
     $module_pageModel = new modulepageModel();
     //	-1 equals all pages
     $req = array();
     $req['pageid'] = array('mode' => 'IN', 'value' => array('-1', $pageid));
     $order = array('fields' => array('areaid', 'order'), 'type' => 'ASC');
     try {
         $modulesForPage = $module_pageModel->get($req, $order);
     } catch (Exception $e) {
         //error
         echo $e->getMessage();
     }
     $pageview = new ui();
     $xajaxJs = $this->xajax->getJavascript();
     global $debugajax;
     if ($debugajax) {
         $debugJs = '<script type="text/javascript" src="xajax_js/xajax_debug.js" charset="UTF-8"></script>';
         $pageview->assign('xajax_javascript', $xajaxJs . "\n" . $debugJs);
     } else {
         $pageview->assign('xajax_javascript', $xajaxJs);
     }
     $output = array();
     $moduleModel = new moduleModel();
     foreach ($modulesForPage as $moduleForPage) {
         try {
             $areaModel = new areaModel();
             $area = $areaModel->getfromId($moduleForPage->getAreaid());
             $meh = 1;
             if (count($area) == 1) {
                 $area = $area[0];
             } else {
                 throw new Exception('Area could not be loaded');
             }
             $module = $moduleModel->getfromId($moduleForPage->getModuleid());
             if (count($module) == 1) {
                 $module = $module[0];
             } else {
                 throw new Exception('Module could not be loaded');
             }
             $controllerName = $module->getName() . 'Controller';
             $actionName = $module->getAction();
             $controller = new $controllerName($module->getPrefix() . '_' . $module->getName());
             foreach ($controller->getAllowedget() as $allowedGetVar) {
                 if (isset($_GET[$allowedGetVar])) {
                     $module->addArguments(array($allowedGetVar => $_GET[$allowedGetVar]));
                 }
             }
             $output[$area->getName()] .= '<div id="' . $module->getPrefix() . '_' . $module->getName() . '" class="module">' . $controller->{$actionName}($module->getArguments()) . '</div>';
         } catch (Exception $e) {
             //	Ok, that didn't work
             $result = createErrorView($e);
             if ($area instanceof areaObject) {
                 $output[$area->getName()] .= '<div class="module">' . $result . '</div>';
             }
         }
     }
     //	Add the popup div
     $output['popup'] = '<div id="popupcontainer" style="visibility: hidden; position: absolute;"></div>';
     foreach ($output as $area => $content) {
         $pageview->assign($area, $content);
     }
     //	Add the RTE
     $myrte = new myrte();
     $pageview->assign('rteheader', $myrte->getHeader());
     $pageview->display($page->getTemplate());
     //	Init the responses
     $response = responseLib::getInstance();
     $_SESSION['initpageresponse'] = $response;
     //echo '<script type="text/javascript" charset="UTF-8">xajax_initpage();</script>';
 }
开发者ID:nephie,项目名称:AZL-website,代码行数:76,代码来源:dispatcher.php


注:本文中的ui::display方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。