• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/landing/urlpreview.php
  • Класс: BitrixLandingLandingUrlPreview
  • Вызов: UrlPreview::buildPreview
static function buildPreview(array $params): ?string
{
	if (isset($params['scope']))
	{
		BitrixLandingSiteType::setScope(
			$params['scope']
		);
	}

	if (!isset($params['URL']))
	{
		$params['URL'] = Manager::getPublicationPath() . $params['URL'];
	}

	$landingId = self::resolveLandingId($params['URL']);
	if ($landingId)
	{
		ob_start();
		Manager::getApplication()->includeComponent(
			'bitrix:landing.socialnetwork.preview',
			'',
			[
				'LANDING_ID' => $landingId
			]
		);
		return ob_get_clean();
	}

	return null;
}