public function load($routingResource, $type = null)
    {
        if ($this->loaded) {
            throw new RuntimeException('Do not add the Admin "extra" loader twice');
        }
        $routes = new RouteCollection();

        foreach ($this->resourceCollection->all() as $name => $resource) {
            $configuration = $this
                ->configurationFactory
                ->createAdminConfiguration(
                    $resource->getName(),
                    $resource->getConfiguration(),
                    $this->applicationConfiguration
                )
            ;

            foreach ($configuration->getParameter('actions') as $actionName => $actionData) {
                $actionConfiguration = $this
                    ->configurationFactory
                    ->createActionConfiguration($actionName, $actionData, $name, $configuration)
                ;
                $route = new Route(
                    $actionConfiguration->getParameter('route_path'),
                    $actionConfiguration->getParameter('route_defaults'),
                    $actionConfiguration->getParameter('route_requirements')
                );
                $routes->add($actionConfiguration->getParameter('route'), $route);
            }

            if ($this->applicationConfiguration->getParameter('enable_homepage')) {
                $route = new Route('/', ['_controller' => HomeAction::class], []);
                $routes->add('lag.admin.homepage', $route);
            }
        }

        return $routes;
    }