当前位置: 首页>>代码示例>>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;未经允许,请勿转载。