- Модуль: catalog
- Путь к файлу: ~/bitrix/modules/catalog/lib/grid/panel/productgroupaction.php
- Класс: BitrixCatalogGridPanelProductGroupAction
- Вызов: ProductGroupAction::getDropdownField
protected function getDropdownField(string $fieldId, array $list): ?array
{
$entity = CatalogProductTable::getEntity();
$field = $entity->getField($fieldId);
$action = [];
$action[] = [
'ACTION' => MainGridPanelActions::RESET_CONTROLS
];
$action[] = [
'ACTION' => MainGridPanelActions::CREATE,
'DATA' => [
[
'TYPE' => MainGridPanelTypes::DROPDOWN,
'ID' => $this->getFormRowFieldId($fieldId),
'NAME' => $this->getFormRowFieldName($fieldId),
'ITEMS' => $list
],
]
];
$result = [
'NAME' => $field->getTitle(),
'VALUE' => $fieldId,
'ONCHANGE' => $action
];
unset($action);
unset($field, $entity);
return $result;
}