本文整理匯總了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;
}