• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/node/styleimg.php
  • Класс: BitrixLandingNodeStyleImg
  • Вызов: StyleImg::isCorrectNodeType
static function isCorrectNodeType(Block $block, string $selector): bool
{
	$matches = [];
	$pattern = '/' . substr($selector, 1) . '[^"]*/i';
	if (preg_match($pattern, $block->getContent(), $matches) === 1)
	{
		$pattern = '/[s]?' . self::STYLES_NODE_CLASS . '[s]?/i';
		if (preg_match($pattern, $matches[0]) === 1)
		{
			return true;
		}
	}
	return false;
}