• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/component.php
  • Класс: CBitrixComponent
  • Вызов: CBitrixComponent::__includeComponent
protected 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");
}