本文整理汇总了PHP中CBitrixComponent::GetParent方法的典型用法代码示例。如果您正苦于以下问题:PHP CBitrixComponent::GetParent方法的具体用法?PHP CBitrixComponent::GetParent怎么用?PHP CBitrixComponent::GetParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBitrixComponent
的用法示例。
在下文中一共展示了CBitrixComponent::GetParent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: IncludeTemplate
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: elseif
/**
* @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;
}