本文整理汇总了PHP中CBitrixComponent::getTemplateName方法的典型用法代码示例。如果您正苦于以下问题:PHP CBitrixComponent::getTemplateName方法的具体用法?PHP CBitrixComponent::getTemplateName怎么用?PHP CBitrixComponent::getTemplateName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBitrixComponent
的用法示例。
在下文中一共展示了CBitrixComponent::getTemplateName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __includeComponent
/**
* Function includes component.php file thus executing the component. Returns what component.php returns.
*
* <p>Before include there is some helper variables made available for component.php scope.</p>
* <p>Note: component must be inited by initComponent method.</p>
* @return mixed
*
*/
protected final function __includeComponent()
{
/** @noinspection PhpUnusedLocalVariableInspection */
global $APPLICATION, $USER, $DB;
if (!$this->__bInited) {
return null;
}
//these vars are used in the component file
$arParams =& $this->arParams;
$arResult =& $this->arResult;
$componentPath = $this->__path;
$componentName = $this->__name;
$componentTemplate = $this->getTemplateName();
if ($this->__parent) {
$parentComponentName = $this->__parent->__name;
$parentComponentPath = $this->__parent->__path;
$parentComponentTemplate = $this->__parent->getTemplateName();
} else {
$parentComponentName = "";
$parentComponentPath = "";
$parentComponentTemplate = "";
}
return include $_SERVER["DOCUMENT_ROOT"] . $this->__path . "/component.php";
}