• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/grid/panel/productgroupaction.php
  • Класс: BitrixCatalogGridPanelProductGroupAction
  • Вызов: ProductGroupAction::actionConvertServiceToProductPanel
protected function actionConvertServiceToProductPanel(array $params = []): ?array
{
	if (!$this->isAllowedProductActions())
	{
		return null;
	}
	if (!$this->isUiGrid())
	{
		return null;
	}

	$params['APPLY_BUTTON_ID'] = 'convert_service_to_product_confirm';
	$params['CONFIRM_MESSAGE'] = Loc::getMessage('IBLOCK_GRID_PANEL_ACTION_CONVERT_SERVICE_TO_PRODUCT_CONFIRM_MESSAGE_MSGVER_1');

	return [
		'name' => (string)($params['NAME'] ?? Loc::getMessage('IBLOCK_GRID_PANEL_ACTION_CONVERT_SERVICE_TO_PRODUCT')),
		'type' => 'multicontrol',
		'action' => [
			[
				'ACTION' => MainGridPanelActions::RESET_CONTROLS
			],
			[
				'ACTION' => MainGridPanelActions::CREATE,
				'DATA' => [$this->getApplyButtonWithConfirm($params)]
			]
		]
	];
}