• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/component_template.php
  • Класс: CBitrixComponentTemplate
  • Вызов: CBitrixComponentTemplate::__IncludeCSSFile
public function __IncludeCSSFile()
{
	/** @global CMain $APPLICATION */
	global $APPLICATION;

	if ($this->__folder <> '')
	{
		if (
			$this->__hasCSS
			|| file_exists($_SERVER["DOCUMENT_ROOT"].$this->__folder."/style.css")
		)
		{
			$APPLICATION->SetAdditionalCSS($this->__folder."/style.css");

			//Check if parent component exists and plug css it to it's "collection"
			if ($this->__component && $this->__component->__parent)
				$this->__component->__parent->addChildCSS($this->__folder."/style.css");
		}
	}
}