• Модуль: fileman
  • Путь к файлу: ~/bitrix/modules/fileman/classes/general/editor_utils.php
  • Класс: CEditorUtils
  • Вызов: CEditorUtils::RenderComponents
static function RenderComponents($arParams)
{
	global $USER;
	$bLPA = !$USER->CanDoOperation('edit_php');
	$startCount = CEditorUtils::StartFetchCSS(); // Start fetch CSS files
	$arParams['name'] = addslashes($arParams['name']);
	$arParams['template'] = addslashes($arParams['template']);
	$arParams['siteTemplateId'] = addslashes($arParams['siteTemplateId']);

	if ($arParams['siteTemplateId'] && !defined("SITE_TEMPLATE_ID"))
		define("SITE_TEMPLATE_ID", $arParams['siteTemplateId']);

	// Report only errors
	error_reporting(E_ERROR);

	if ($arParams['name']) // one component by name
		$s = CEditorUtils::_RenderOneComponent($arParams, $bLPA);
	elseif ($arParams['source']) // all components from content
		$s = CEditorUtils::_RenderAllComponents($arParams, $bLPA);

	CEditorUtils::GetCSS($startCount); // Echo path to css

	// Cut out all scripts
	$s = preg_replace("/]*?>[s|S]*?/is", '', $s);
	// Cut out 
....
$s = preg_replace("/]*?class="bx-component-panel"[^>]*?>[^<]*?[^<]*?
/is", '', $s); echo $s; }