當前位置: 首頁>>代碼示例>>PHP>>正文


PHP org_glizy_ObjectFactory::attachPageToComponent方法代碼示例

本文整理匯總了PHP中org_glizy_ObjectFactory::attachPageToComponent方法的典型用法代碼示例。如果您正苦於以下問題:PHP org_glizy_ObjectFactory::attachPageToComponent方法的具體用法?PHP org_glizy_ObjectFactory::attachPageToComponent怎麽用?PHP org_glizy_ObjectFactory::attachPageToComponent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org_glizy_ObjectFactory的用法示例。


在下文中一共展示了org_glizy_ObjectFactory::attachPageToComponent方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: process

 public function process()
 {
     if ($this->getAttribute('global')) {
         $templateXml = 'TemplateAdminGlobal';
         $menuId = 0;
     } else {
         $templateXml = 'TemplateAdmin';
         $menuId = __Request::get('menuId', __Request::get('__id'));
         if (!$menuId) {
             // TODO ERRORE
         }
     }
     $templateProxy = org_glizy_ObjectFactory::createObject('org.glizycms.template.models.proxy.TemplateProxy');
     $templateName = $templateProxy->getSelectedTemplate();
     if (!$templateName) {
         // TODO ERRORE
     }
     $templateProxy->loadTemplateLocale();
     // legge i dati del template
     $data = $templateProxy->getEditDataForMenu($menuId, __Request::exists('loadFromParent'));
     $customTemplate = $templateProxy->getTemplateCustomClass();
     if ($customTemplate && method_exists($customTemplate, 'updateTemplateData')) {
         $customTemplate->updateTemplateData($data);
     }
     $this->setData($data);
     $this->addDefaultComponents();
     $templateRealPath = $templateProxy->getTemplateRealpath();
     if ($templateRealPath) {
         org_glizy_ObjectFactory::attachPageToComponent($this, $this->_application, $templateXml, $templateRealPath . '/', array('idPrefix' => $this->getId() . '-', 'skipImport' => true, 'mode' => 'edit'), $this->getId() . '-');
         parent::process();
         // TODO visualizzare che non ci sono parametri di personalizzazione
     }
 }
開發者ID:GruppoMeta,項目名稱:Movio,代碼行數:33,代碼來源:TemplateEdit.php

示例2: loadTemplate

 protected function loadTemplate()
 {
     if (__Config::get('glizycms.contents.templateEnabled')) {
         $templateProxy = org_glizy_ObjectFactory::createObject('org.glizycms.template.models.proxy.TemplateProxy');
         $templateName = $templateProxy->getSelectedTemplate();
         $templatePath = $templateProxy->getTemplateRealpath();
         $this->templateData = $templateProxy->getDataForMenu($this->_application->getPageId());
         // if is defined a custom XML file read and attach to component DOM
         if (file_exists($templatePath . '/Template.xml')) {
             org_glizy_ObjectFactory::attachPageToComponent($this, $this->_application, 'Template', $templateProxy->getTemplateRealpath(), array(), $this->selfId . '-', false);
         }
         // check if there is a templateFileName override
         if (property_exists($this->templateData, 'templateFileName') && $this->templateData->templateFileName != 'default') {
             $this->setAttribute('templateFileName', $this->templateData->templateFileName);
         }
         $this->customTemplate = $templateProxy->getTemplateCustomClass();
         if (is_object($this->customTemplate) && method_exists($this->customTemplate, 'process')) {
             $this->customTemplate->process($this->_application, $this, $this->templateData);
         }
     }
 }
開發者ID:GruppoMeta,項目名稱:Movio,代碼行數:21,代碼來源:Page.php


注:本文中的org_glizy_ObjectFactory::attachPageToComponent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。