менее рукожопый способ получать их значения?
<?php
global $USER_FIELD_MANAGER;
use Bitrix\Main\Loader;
use Bitrix\Highloadblock\HighloadBlockTable;
Loader::includeModule('highloadblock');
$entity = HighloadBlockTable::compileEntity('LinkedSections');
$hlblock = LinkedSectionsTable::getHighloadBlock();
$userFields = $USER_FIELD_MANAGER->getUserFields('HLBLOCK_'.$hlblock['ID']);
$ufEnums = [];
$rsUserFieldEnums = CUserFieldEnum::GetList(array(), array('USER_FIELD_ID' => array_column($userFields, 'ID')));
while ($userFieldEnum = $rsUserFieldEnums->Fetch()) {
$ufEnums[$userFieldEnum['ID']] = $userFieldEnum;
}
// далее: $ufEnums[$elm['UF_...']]
https://dev.1c-bitrix.ru/api_help/iblock/classes/ciblockformatproperties/getdisplayvalue.php
Обсуждают сегодня