src/Configuration/ActionConfigPass.php
private function normalizeBatchActionsConfig(array $backendConfig)
    {
        // first, normalize batch actions defined globally for the entire backend
        $batchActionsConfig = $backendConfig['list']['batch_actions'];
        $batchActionsConfig = $this->doNormalizeActionsConfig($batchActionsConfig, 'the global "list" view defined under "easy_admin" option');

        $backendConfig['list']['batch_actions'] = $batchActionsConfig;
        foreach ($backendConfig['list']['batch_actions'] as $actionName => $actionConfig) {
            if (null === $actionConfig['css_class'] && 'delete' === $actionName) {
                $backendConfig['list']['batch_actions'][$actionName]['css_class'] = 'btn-danger';
            }
        }

        // second, normalize batch actions defined for each entity
        foreach ($backendConfig['entities'] as $entityName => $entityConfig) {
            $batchActionsConfig = $entityConfig['list']['batch_actions'];
            $batchActionsConfig = $this->doNormalizeActionsConfig($batchActionsConfig, \sprintf('the "list" view of the "%s" entity', $entityName));

            foreach ($batchActionsConfig as $actionName => $actionConfig) {
                if (null === $actionConfig['css_class'] && 'delete' === $actionName) {
                    $batchActionsConfig[$actionName]['css_class'] = 'btn-danger';
                }
            }

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

        return $backendConfig;
    }
private function normalizeBatchActionsConfig(array $backendConfig)
    {
        // first, normalize batch actions defined globally for the entire backend
        $batchActionsConfig = $backendConfig['list']['batch_actions'];
        $batchActionsConfig = $this->doNormalizeActionsConfig($batchActionsConfig, 'the global "list" view defined under "easy_admin" option');

        $backendConfig['list']['batch_actions'] = $batchActionsConfig;
        foreach ($backendConfig['list']['batch_actions'] as $actionName => $actionConfig) {
            if (null === $actionConfig['css_class'] && 'delete' === $actionName) {
                $backendConfig['list']['batch_actions'][$actionName]['css_class'] = 'btn-danger';
            }
        }

        // second, normalize batch actions defined for each entity
        foreach ($backendConfig['entities'] as $entityName => $entityConfig) {
            $batchActionsConfig = $entityConfig['list']['batch_actions'];
            $batchActionsConfig = $this->doNormalizeActionsConfig($batchActionsConfig, \sprintf('the "list" view of the "%s" entity', $entityName));

            foreach ($batchActionsConfig as $actionName => $actionConfig) {
                if (null === $actionConfig['css_class'] && 'delete' === $actionName) {
                    $batchActionsConfig[$actionName]['css_class'] = 'btn-danger';
                }
            }

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

        return $backendConfig;
    }
Transforms the different batch action configuration formats into a normalized
and expanded format. These are the two simple formats allowed:.

# Config format #1: no custom option
easy_admin:
entities:
User:
list:
batch_actions: ['delete', 'reset']

# Config format #2: one or more actions define any of their options
easy_admin:
entities:
User:
list:
batch_actions: ['delete', { name: 'reset', label: 'Reset Account' }]

@param array $backendConfig

@return array