• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/Integration/Iblock/BrandProperty.php
  • Класс: BitrixCatalogv2IntegrationIblockBrandProperty
  • Вызов: BrandProperty::createHighloadBlockTable
static function createHighloadBlockTable(): ?string
{
	if (!Loader::includeModule('highloadblock'))
	{
		return null;
	}

	$uniqId = uniqid('BRAND_FOR_FACEBOOK_', false);
	$className = StringHelper::snake2camel($uniqId);
	$tableName = mb_strtolower(CIBlockPropertyDirectory::createHighloadTableName($uniqId));

	$addResult = HighloadBlockTable::add([
		'NAME' => $className,
		'TABLE_NAME' => $tableName,
	]);
	if (!$addResult->isSuccess())
	{
		return null;
	}

	$userFieldEntity = new CUserTypeEntity();

	foreach (self::getUserFieldDescriptions((string)$addResult->getId()) as $description)
	{
		$userFieldEntity->Add($description);
	}

	return $tableName;
}