diff --git a/core/lib/Drupal/Core/Routing/RouteBuilder.php b/core/lib/Drupal/Core/Routing/RouteBuilder.php index 45536c3..8ae07c0 100644 --- a/core/lib/Drupal/Core/Routing/RouteBuilder.php +++ b/core/lib/Drupal/Core/Routing/RouteBuilder.php @@ -111,10 +111,10 @@ public function rebuild() { if (isset($routes['route_callbacks'])) { foreach ($routes['route_callbacks'] as $route_callback) { - $controller = $this->controllerResolver->getControllerFromDefinition($route_callback); - if ($controller_routes = call_user_func($controller, $collection)) { - foreach ($controller_routes as $name => $controller_route) { - $collection->add($name, $controller_route); + $callback = $this->controllerResolver->getControllerFromDefinition($route_callback); + if ($callback_routes = call_user_func($callback, $collection)) { + foreach ($callback_routes as $name => $callback_route) { + $collection->add($name, $callback_route); } } } diff --git a/core/modules/image/image.routing.yml b/core/modules/image/image.routing.yml index 511fe2f..46dfb5d 100644 --- a/core/modules/image/image.routing.yml +++ b/core/modules/image/image.routing.yml @@ -70,5 +70,4 @@ image.effect_edit_form: _permission: 'administer image styles' route_callbacks: - - '\Drupal\image\EventSubscriber\ImageStyleRoutes::routes' - + - '\Drupal\image\Routing\ImageStyleRoutes::routes' diff --git a/core/modules/image/lib/Drupal/image/EventSubscriber/ImageStyleRoutes.php b/core/modules/image/lib/Drupal/image/Routing/ImageStyleRoutes.php similarity index 96% rename from core/modules/image/lib/Drupal/image/EventSubscriber/ImageStyleRoutes.php rename to core/modules/image/lib/Drupal/image/Routing/ImageStyleRoutes.php index 1728232..39b2379 100644 --- a/core/modules/image/lib/Drupal/image/EventSubscriber/ImageStyleRoutes.php +++ b/core/modules/image/lib/Drupal/image/Routing/ImageStyleRoutes.php @@ -5,7 +5,7 @@ * Contains \Drupal\image\EventSubscriber\RouteSubscriber. */ -namespace Drupal\image\EventSubscriber; +namespace Drupal\image\Routing; use Symfony\Component\Routing\Route; diff --git a/core/modules/rest/lib/Drupal/rest/EventSubscriber/ResourceRoutes.php b/core/modules/rest/lib/Drupal/rest/Routing/ResourceRoutes.php similarity index 98% rename from core/modules/rest/lib/Drupal/rest/EventSubscriber/ResourceRoutes.php rename to core/modules/rest/lib/Drupal/rest/Routing/ResourceRoutes.php index 5e20fce..ef1b93f 100644 --- a/core/modules/rest/lib/Drupal/rest/EventSubscriber/ResourceRoutes.php +++ b/core/modules/rest/lib/Drupal/rest/Routing/ResourceRoutes.php @@ -5,7 +5,7 @@ * Contains \Drupal\rest\EventSubscriber\RouteSubscriber. */ -namespace Drupal\rest\EventSubscriber; +namespace Drupal\rest\Routing; use Drupal\Core\Config\ConfigFactory; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; diff --git a/core/modules/rest/rest.routing.yml b/core/modules/rest/rest.routing.yml index c47c874..3017130 100644 --- a/core/modules/rest/rest.routing.yml +++ b/core/modules/rest/rest.routing.yml @@ -6,4 +6,4 @@ rest.csrftoken: _access: 'TRUE' route_callbacks: - - '\Drupal\rest\EventSubscriber\ResourceRoutes::routes' + - '\Drupal\rest\Routing\ResourceRoutes::routes'