src/Configuration/ActionConfigPass.php
private function resolveBatchActionInheritance(array $backendConfig)
    {
        foreach ($backendConfig['entities'] as $entityName => $entityConfig) {
            $backendBatchActions = $backendConfig['list']['batch_actions'];
            $entityBatchActions = $entityConfig['list']['batch_actions'];

            // filter batch actions removed in the global view configuration
            foreach ($backendBatchActions as $backendAction) {
                if ('-' === $backendAction['name'][0]) {
                    $actionName = \mb_substr($backendAction['name'], 1);

                    unset($backendBatchActions[$actionName], $backendBatchActions['-'.$actionName]);
                }
            }

            // filter batch actions removed in the local entity configuration
            foreach ($entityBatchActions as $entityAction) {
                if ('-' === $entityAction['name'][0]) {
                    $actionName = \mb_substr($entityAction['name'], 1);

                    unset($entityBatchActions[$actionName], $entityBatchActions['-'.$actionName], $backendBatchActions[$actionName]);
                }
            }

            $batchActionsConfig = \array_merge($backendBatchActions, $entityBatchActions);

            // reorder the batch actions to match the order set by the user in the
            // entity or in the global backend options
            if (!empty($entityBatchActions)) {
                $batchActionsConfig = $this->reorderArrayItems($batchActionsConfig, \array_keys($entityBatchActions));
            } elseif (!empty($backendBatchActions)) {
                $batchActionsConfig = $this->reorderArrayItems($batchActionsConfig, \array_keys($backendBatchActions));
            }

            $backendConfig['entities'][$entityName]['list']['batch_actions'] = $batchActionsConfig;
        }

        return $backendConfig;
    }
private function resolveBatchActionInheritance(array $backendConfig)
    {
        foreach ($backendConfig['entities'] as $entityName => $entityConfig) {
            $backendBatchActions = $backendConfig['list']['batch_actions'];
            $entityBatchActions = $entityConfig['list']['batch_actions'];

            // filter batch actions removed in the global view configuration
            foreach ($backendBatchActions as $backendAction) {
                if ('-' === $backendAction['name'][0]) {
                    $actionName = \mb_substr($backendAction['name'], 1);

                    unset($backendBatchActions[$actionName], $backendBatchActions['-'.$actionName]);
                }
            }

            // filter batch actions removed in the local entity configuration
            foreach ($entityBatchActions as $entityAction) {
                if ('-' === $entityAction['name'][0]) {
                    $actionName = \mb_substr($entityAction['name'], 1);

                    unset($entityBatchActions[$actionName], $entityBatchActions['-'.$actionName], $backendBatchActions[$actionName]);
                }
            }

            $batchActionsConfig = \array_merge($backendBatchActions, $entityBatchActions);

            // reorder the batch actions to match the order set by the user in the
            // entity or in the global backend options
            if (!empty($entityBatchActions)) {
                $batchActionsConfig = $this->reorderArrayItems($batchActionsConfig, \array_keys($entityBatchActions));
            } elseif (!empty($backendBatchActions)) {
                $batchActionsConfig = $this->reorderArrayItems($batchActionsConfig, \array_keys($backendBatchActions));
            }

            $backendConfig['entities'][$entityName]['list']['batch_actions'] = $batchActionsConfig;
        }

        return $backendConfig;
    }
Batch actions can be added/removed globally in the list view of
the backend and locally in each of the configured entities. Local config always
wins over the global config (e.g. if backend removes 'delete' action in the
'list' view but some action explicitly adds 'delete' in its 'list' view,
then that entity shows the 'delete' action and the others don't).