• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/component.php
  • Класс: CBitrixComponent
  • Вызов: CBitrixComponent::__construct
public function __construct($component = null)
{
	if(is_object($component) && ($component instanceof cbitrixcomponent))
	{
		$this->__name = $component->__name;
		$this->__relativePath = $component->__relativePath;
		$this->__path = $component->__path;
		$this->__templateName = $component->__templateName;
		$this->__templatePage = $component->__templatePage;
		$this->__template = $component->__template;
		$this->__component_epilog = $component->__component_epilog;
		$this->arParams = $component->arParams;
		$this->arResult = $component->arResult;
		$this->arResultCacheKeys = $component->arResultCacheKeys;
		$this->__parent = $component->__parent;
		$this->__bInited = $component->__bInited;
		$this->__arIncludeAreaIcons = $component->__arIncludeAreaIcons;
		$this->__NavNum = $component->__NavNum;
		$this->__cache = $component->__cache;
		$this->__cacheID = $component->__cacheID;
		$this->__cachePath = $component->__cachePath;
		$this->__children_css = $component->__children_css;
		$this->__children_js = $component->__children_js;
		$this->__children_epilogs = $component->__children_epilogs;
		$this->__children_frames = $component->__children_frames;
		$this->__view = $component->__view;
		$this->__currentCounter = $component->__currentCounter;
		$this->__currentCounters = $component->__currentCounters;
		$this->__editButtons = $component->__editButtons;
		$this->classOfComponent = $component->classOfComponent;
		$this->setSiteId($component->getSiteId());
		$this->setLanguageId($component->getLanguageId());
		$this->setSiteTemplateId($component->getSiteTemplateId());
	}
	else
	{
		$this->setSiteId(SITE_ID);
		$this->setLanguageId(LANGUAGE_ID);
		if (defined('SITE_TEMPLATE_ID'))
			$this->setSiteTemplateId(SITE_TEMPLATE_ID);
	}

	$this->request = BitrixMainContext::getCurrent()->getRequest();
}