• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/product/systemfield/markingcodegroup.php
  • Класс: BitrixCatalogProductSystemFieldMarkingCodeGroup
  • Вызов: MarkingCodeGroup::checkRestictions
static function checkRestictions(array $restrictions): bool
{
	if (!parent::checkRestictions($restrictions))
	{
		return false;
	}

	if (isset($restrictions['IBLOCK_ID']) && !isset($restrictions['CATALOG']))
	{
		$iterator = CatalogCatalogIblockTable::getList([
			'select' => [
				'*',
			],
			'filter' => [
				'=IBLOCK_ID' => $restrictions['IBLOCK_ID'],
			],
			'cache' => [
				'ttl' => 86400,
			]
		]);
		$row = $iterator->fetch();
		if (!empty($row))
		{
			$restrictions['CATALOG'] = $row;
		}
		unset($row, $iterator);
	}

	if (!empty($restrictions['CATALOG']) && is_array($restrictions['CATALOG']))
	{
		if ($restrictions['CATALOG']['SUBSCRIPTION'] === 'Y')
		{
			return false;
		}
	}

	return true;
}