• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/product/systemfield/highloadblock.php
  • Класс: BitrixCatalogProductSystemFieldHighloadblock
  • Вызов: Highloadblock::getIdListByXmlId
static function getIdListByXmlId(int $hlblockId, array $xmlIdList): array
{
	$className = get_called_class();
	if (!isset(self::$reverseDictionary[$className]))
	{
		self::$reverseDictionary[$className] = [];
	}

	$result = [];

	$needList = [];
	foreach ($xmlIdList as $xmlId)
	{
		if (isset(self::$reverseDictionary[$className][$xmlId]))
		{
			if (self::$reverseDictionary[$className][$xmlId] !== false)
			{
				$result[$xmlId] = self::$reverseDictionary[$className][$xmlId];
			}
		}
		else
		{
			$needList[] = $xmlId;
		}
	}
	unset($id);

	if (!empty($needList))
	{
		$list = TypeHighloadBlock::getIdByXmlId($hlblockId, $needList);
		foreach ($needList as $xmlId)
		{
			self::$reverseDictionary[$className][$xmlId] = $list[$xmlId] ?? false;
			if (self::$reverseDictionary[$className][$xmlId] !== false)
			{
				$result[$xmlId] = self::$reverseDictionary[$className][$xmlId];
			}
		}
		unset($xmlId);
	}
	unset($needList);
	unset($className);

	return $result;
}