Пример #1
0
 /**
  * @param bool $forceReload
  */
 function _initSiteMap($forceReload = false)
 {
     if ($this->useXmlSiteMap) {
         $this->siteMap = org_glizy_ObjectFactory::createObject('org.glizy.application.SiteMapXML');
         $this->siteMap->getSiteArray($forceReload);
     } else {
         parent::_initSiteMap();
     }
 }
Пример #2
0
 /**
  * @param org_glizy_components_Component $component
  * @param org_glizy_application_Application $application
  * @param string $pageType
  * @param string $path
  * @param array $options
  * @param string $remapId
  * @param bool $atTop
  */
 function attachPageToComponent($component, $application, $pageType, $path, $options, $remapId, $atTop = true)
 {
     $originalRootComponent = $application->getRootComponent();
     $originalChildren = $component->childComponents;
     $component->childComponents = array();
     org_glizy_ObjectFactory::createPage($application, $pageType, $path, $options);
     $rootComponent = $application->getRootComponent();
     $rootComponent->init();
     $rootComponent->execDoLater();
     $application->_rootComponent =& $originalRootComponent;
     for ($i = 0; $i < count($rootComponent->childComponents); $i++) {
         $rootComponent->childComponents[$i]->remapAttributes($remapId);
         $component->addChild($rootComponent->childComponents[$i]);
         $rootComponent->childComponents[$i]->_parent =& $component;
     }
     $component->childComponents = $atTop ? array_merge($component->childComponents, $originalChildren) : array_merge($originalChildren, $component->childComponents);
 }