• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/product/systemfield/markingcodegroup.php
  • Класс: BitrixCatalogProductSystemFieldMarkingCodeGroup
  • Вызов: MarkingCodeGroup::isAllowed
static function isAllowed(): bool
{
	/** @var CatalogProductSystemFieldTypeHighloadBlock $className */
	$className = static::getTypeId();

	if (!$className::isAllowed())
	{
		return false;
	}
	if (!static::isBitrix24())
	{
		$iterator = LanguageTable::getList([
			'select' => ['ID'],
			'filter' => [
				'=ID' => 'ru',
				'=ACTIVE' => 'Y',
			],
		]);
		$row = $iterator->fetch();
		unset($iterator);
		if (empty($row))
		{
			return false;
		}
		$iterator = LanguageTable::getList([
			'select' => ['ID'],
			'filter' => [
				'@ID' => ['ua', 'by', 'kz'],
				'=ACTIVE' => 'Y',
			],
			'limit' => 1,
		]);
		$row = $iterator->fetch();
		unset($iterator);
		if (!empty($row))
		{
			return false;
		}
		return true;
	}
	else
	{
		return (CBitrix24::getPortalZone() === 'ru');
	}
}