function IncludeTemplate(&$arResult)
 {
     global $arBXAvailableTemplateEngines;
     if (!$this->__bInited) {
         return false;
     }
     $arParams = $this->__component->arParams;
     if ($this->__folder != '') {
         $arLangMessages = $this->IncludeLangFile();
         $this->__IncludeMutatorFile($arResult, $arParams);
         if (!isset($this->__hasCSS) || $this->__hasCSS) {
             $this->__IncludeCSSFile();
         }
         if (!isset($this->__hasJS) || $this->__hasJS) {
             $this->__IncludeJSFile();
         }
     } else {
         $arLangMessages = array();
     }
     $parentTemplateFolder = "";
     $parentComponent = $this->__component->GetParent();
     if ($parentComponent) {
         $parentTemplate = $parentComponent->GetTemplate();
         $parentTemplateFolder = $parentTemplate->GetFolder();
     }
     if (StrLen($arBXAvailableTemplateEngines[$this->__engineID]["function"]) > 0 && function_exists($arBXAvailableTemplateEngines[$this->__engineID]["function"])) {
         $result = call_user_func($arBXAvailableTemplateEngines[$this->__engineID]["function"], $this->__file, $arResult, $arParams, $arLangMessages, $this->__folder, $parentTemplateFolder, $this);
     } else {
         $result = $this->__IncludePHPTemplate($arResult, $arParams, $parentTemplateFolder);
     }
     return $result;
 }
示例#2
0
 /**
  * @param CBitrixComponent $parent
  * @return bool
  */
 function _checkParent($parent)
 {
     if ('Y' == $parent->arParams['AJAX_MODE']) {
         return true;
     } elseif ($parentComponent = $parent->GetParent()) {
         return $this->_checkParent($parentComponent);
     }
     return false;
 }