Exemplo n.º 1
0
 function _startProcess($readPageId = true)
 {
     $this->log("startProcess", GLZ_LOG_SYSTEM);
     $this->checkSwitchLanguage();
     $controller = __Request::get('controller', '', GLZ_REQUEST_ROUTING);
     if ($controller) {
         $controllerClass = org_glizy_ObjectFactory::createObject($controller, null, $this);
         org_glizy_helpers_PhpScript::callMethodWithParams($controllerClass, 'execute');
     }
     $this->readSiteProperties();
     $this->setTemplateFolder();
     if ($readPageId) {
         $evt = array('type' => GLZ_EVT_BEFORE_CREATE_PAGE);
         $this->dispatchEvent($evt);
         $this->_readPageId();
     }
     if ($this->siteMapMenu->isVisible === false) {
         while (true) {
             $parentMenu =& $this->siteMapMenu->parentNode();
             if (is_null($parentMenu)) {
                 // ERROR
                 $e = new org_glizy_Exception(array('[%s] %s', $this->getClassName(), __T(GLZ_ERR_EMPTY_APP_PATH)));
             }
             $this->siteMapMenu =& $parentMenu;
             if ($parentMenu->isVisible === true) {
                 $this->_pageId = $this->siteMapMenu->id;
                 break;
             }
         }
     }
     // TODO da risolvare in modo migliore
     // creando un nuovo menu_type
     if ($this->siteMapMenu->pageType == 'Empty') {
         $currentPage =& $this->siteMapMenu;
         while (true) {
             $childNodes = $currentPage->childNodes();
             if (!count($childNodes)) {
                 org_glizy_helpers_Navigation::gotoUrl(GLZ_HOST);
                 break;
             }
             $tempPage =& $childNodes[0];
             $currentPage =& $tempPage;
             if ($currentPage->pageType != 'Empty') {
                 $this->siteMapMenu =& $currentPage;
                 $this->_pageId = $currentPage->id;
                 break;
             }
         }
     }
     parent::_startProcess(false);
 }
Exemplo n.º 2
0
 function _startProcess()
 {
     $this->hostApplicationToAdmin = preg_replace('/\\/admin$/', '', GLZ_HOST);
     parent::_startProcess();
 }