function render($mode) { if (!$this->_application->isAdmin()) { $this->setAttribute('skin', 'DictionaryList.html'); } parent::render($mode); }
function render($outputMode = NULL, $skipChilds = false) { if ($this->getAttribute('addValidationJs')) { $this->_application->addValidateJsCode($this->getId()); } if (!is_null($this->getAttribute('skin')) && $outputMode == 'html') { $this->acceptOutput = true; $this->_content = new StdClass(); for ($i = 0; $i < count($this->childComponents); $i++) { if ($this->childComponents[$i]->getAttribute('visible') && $this->childComponents[$i]->getAttribute('enabled')) { $this->currentRenderChildId = $this->childComponents[$i]->getId(); $this->_content->{$this->currentRenderChildId} = ''; $this->childComponents[$i]->render($outputMode); $this->state = COMPONENT_STATE_RENDER; if ($this->checkBreakCycle()) { $this->state = COMPONENT_STATE_BLOCKED; $this->breakCycle(false); break; } } } } parent::render($outputMode, $skipChilds); }
function render($outputMode = NULL, $skipChilds = false) { if ($this->_isEnabled || $outputMode != 'html') { parent::render($outputMode, $skipChilds); } }
/** * @param bool $readPageId */ function _startProcess($readPageId = true) { $this->log("startProcess", GLZ_LOG_SYSTEM); if ($this->_logObj) { $this->log(array('Request' => __Request::getAllAsArray()), GLZ_LOG_SYSTEM); } if ($readPageId) { $evt = array('type' => GLZ_EVT_BEFORE_CREATE_PAGE); $this->dispatchEvent($evt); $this->_readPageId(); } org_glizy_ObjectValues::set('org.glizy.application', 'pageId', $this->_pageId); $this->_pageType = $this->siteMapMenu->pageType; if (__Request::exists('__middleware__')) { $middlewareObj = org_glizy_ObjectFactory::createObject(__Request::get('__middleware__')); // verify the cache before page rendering // this type of cache is available only for Static Page if ($middlewareObj) { $middlewareObj->beforeProcess($this->_pageId, $this->_pageType); } } org_glizy_ObjectFactory::createPage($this, $this->_pageType, null, array('pathTemplate' => org_glizy_Paths::get('APPLICATION_TEMPLATE'))); if (!is_null($this->_rootComponent)) { if (!$this->_ajaxMode) { // serve per resettare lo stato del sessionEx ad ogni caricamento delle pagine // altrimenti gli stati vecchi non vengono cancellati // quando c'è un cambio di pagina e SessionEx non è usato org_glizy_ObjectFactory::createObject('org.glizy.SessionEx', ''); $this->_rootComponent->resetDoLater(); $this->_rootComponent->init(); $this->_rootComponent->execDoLater(); $this->log("Process components", GLZ_LOG_SYSTEM); $this->_rootComponent->resetDoLater(); $evt = array('type' => GLZ_EVT_START_PROCESS); $this->dispatchEvent($evt); if (method_exists($this, 'process_onStart')) { $this->process_onStart(); } $this->_rootComponent->process(); if (method_exists($this, 'process_onEnd')) { $this->process_onEnd(); } $this->_rootComponent->execDoLater(); $evt = array('type' => GLZ_EVT_END_PROCESS); $this->dispatchEvent($evt); // check if enable the PDF output if ($this->getCurrentMenu()->printPdf) { $pdfPage = org_glizy_Paths::getRealPath('APPLICATION_TEMPLATE', 'pdf.php'); if ($pdfPage !== false) { if (__Request::get('printPdf', '0')) { org_glizy_ObjectValues::set('org.glizy.application', 'pdfMode', __Request::get('printPdf', '0') == '1'); } } else { $this->getCurrentMenu()->printPdf = false; } } $evt = array('type' => GLZ_EVT_START_RENDER); $this->dispatchEvent($evt); $this->_rootComponent->resetDoLater(); if (method_exists($this, 'render_onStart')) { $this->render_onStart(); } $this->addJScoreLibraries(); $output = $this->_rootComponent->render(); if (method_exists($this, 'render_onEnd')) { $this->render_onEnd(); } $this->_rootComponent->execDoLater(); $evt = array('type' => GLZ_EVT_END_RENDER); $this->dispatchEvent($evt); $headerErrorCode = __Request::get('glizyHeaderCode', ''); if ($headerErrorCode == '404') { header("HTTP/1.1 404 Not Found"); header("Status: 404 Not Found"); } header("Content-Type: " . $this->contentType . "; charset=" . __Config::get('CHARSET')); if ($middlewareObj) { // verify the cache after content rendering $middlewareObj->afterRender($output); } echo $output; } else { $this->startProcessAjax(); } } else { // TODO // visualizzare errore } }