• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/node/img.php
  • Класс: BitrixLandingNodeImg
  • Вызов: Img::changeNodeType
static function changeNodeType(array $node, BitrixLandingBlock $block): array
{
	$matches = [];
	$pattern = '/' . substr($node['code'], 1) . '[^"]*/i';
	if (preg_match($pattern, $block->getContent(), $matches) === 1)
	{
		$pattern = '/[s]?g-bg-image[s]?/i';
		if (preg_match($pattern, $matches[0]) === 1)
		{
			$node['type'] = 'styleimg';
			$node['handler'] = StyleImg::getHandlerJS();
		}
	}

	return $node;
}