• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/publicaction/demos.php
  • Класс: BitrixLandingPublicActionDemos
  • Вызов: Demos::getUrlPreview
static function getUrlPreview($code, $type)
{
	$result = new PublicActionResult();

	if (!is_string($code) || !is_string($type))
	{
		return $result;
	}

	$componentName = 'bitrix:landing.demo';
	$className = CBitrixComponent::includeComponentClass($componentName);
	$demoCmp = new $className;
	$demoCmp->initComponent($componentName);
	$demoCmp->arParams = array(
		'TYPE' => mb_strtoupper($type)
	);

	$result->setResult($demoCmp->getUrlPreview($code));

	return $result;
}