src/Configuration/TemplateConfigPass.php
private function processDefaultTemplates(array $backendConfig)
    {
        // 1st level priority: easy_admin.design.templates.<templateName> config option
        // 2nd level priority: @EasyAdmin/default/<templateName>.html.twig
        foreach ($this->defaultBackendTemplates as $templateName => $defaultTemplatePath) {
            $candidateTemplates = [
                $backendConfig['design']['templates'][$templateName] ?? '',
                $defaultTemplatePath,
            ];
            $templatePath = $this->findFirstExistingTemplate($candidateTemplates);

            if (null === $templatePath) {
                throw new \RuntimeException(\sprintf('None of the templates defined for the global "%s" template of the backend exists (templates defined: %s).', $templateName, \implode(', ', $candidateTemplates)));
            }

            $backendConfig['design']['templates'][$templateName] = $templatePath;
        }

        return $backendConfig;
    }
private function processDefaultTemplates(array $backendConfig)
    {
        // 1st level priority: easy_admin.design.templates.<templateName> config option
        // 2nd level priority: @EasyAdmin/default/<templateName>.html.twig
        foreach ($this->defaultBackendTemplates as $templateName => $defaultTemplatePath) {
            $candidateTemplates = [
                $backendConfig['design']['templates'][$templateName] ?? '',
                $defaultTemplatePath,
            ];
            $templatePath = $this->findFirstExistingTemplate($candidateTemplates);

            if (null === $templatePath) {
                throw new \RuntimeException(\sprintf('None of the templates defined for the global "%s" template of the backend exists (templates defined: %s).', $templateName, \implode(', ', $candidateTemplates)));
            }

            $backendConfig['design']['templates'][$templateName] = $templatePath;
        }

        return $backendConfig;
    }
Determines the templates used to render each backend element when no
entity configuration is available. It's similar to processEntityTemplates()
but it doesn't take into account the details of each entity.
This is needed for example when an exception is triggered and no entity
configuration is available to know which template should be rendered.

@param array $backendConfig

@return array