README.md

Установка

Распаковать файлы в /local/modules/profistudio.moreusertypes

Пример использования свойства “Привязка к значению свойства”:

Loader::includeModule('profistudio.moreusertypes');
Loader::includeModule('highloadblock');

$property = 'SIZES_SHOES';
$iblockId = 3;
$elementId = 240;
$element = \CIBlockElement::GetList(
    [],
    [
        'IBLOCK_ID' => $iblockId,
        'ACTIVE' => 'Y',
        'ID' => $elementId,
    ],
    false,
    [
        'nPageSize' => 1,
    ],
    [
        'IBLOCK_ID',
        'ID',
        'NAME',
        'PROPERTY_' . $property,
    ]
)->GetNext(true, false);

$hlblockId = 4;
$hlblock = Highloadblock\HighloadBlockTable::getById($hlblockId)->fetch();
$entity = Highloadblock\HighloadBlockTable::compileEntity($hlblock);
$entityClass = $entity->getDataClass();

$hlblockElement = $entityClass::getList([
    'filter' => [
        'UF_TEST2' => "{$property}|{$element['PROPERTY_' . $property . '_ENUM_ID']}",
    ],
    'select' => [
        '*',
    ],
])->fetch();

dd($element);
dd($hlblockElement);
Конвейеры
0 успешных
0 с ошибкой