• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/hook/page/background.php
  • Класс: BitrixLandingHookPageBackground
  • Вызов: Background::setBackground
static function setBackground(?string $picture, ?string $color = null, ?string $position = null): void
{
	/**
	 * !!!
	 * Also see landing.pub/templates/.default/result_modifier.php
	 * for web form backward compatibility.
	 */

	if ($picture && is_numeric($picture) && (int)$picture > 0)
	{
		$picture = htmlspecialcharsbx(
			File::getFilePath((int)$picture)
		);
	}

	if ($picture)
	{
		if ($position === 'center')
		{
			Asset::getInstance()->addString(
				''
			);
		}
		elseif ($position === 'repeat')
		{
			Asset::getInstance()->addString(
				''
			);
		}
		elseif ($position === 'no_repeat')
		{
			Asset::getInstance()->addString(
				''
			);
		}
		else
		{
			Asset::getInstance()->addString(
				''
			);
		}
	}

	if ($color)
	{
		Asset::getInstance()->addString(
			''
		);
	}
}