diff --git a/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php index 39f9ceb..ca1d1b7 100644 --- a/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php @@ -46,18 +46,4 @@ protected function alterRoutes(RouteCollection $collection, $module) { return TRUE; } - /** - * Delegates the route altering to self::alterRoutes(). - * - * @param \Drupal\Core\Routing\RouteBuildEvent $event - * The route build event. - * - * @return bool - * Returns TRUE if the variables were succesfully replaced, otherwise FALSE. - */ - public function onAlterRoutes(RouteBuildEvent $event) { - $collection = $event->getRouteCollection(); - return $this->alterRoutes($collection, $event->getModule()); - } - } diff --git a/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php b/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php index 615a820..840e4bf 100644 --- a/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php +++ b/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php @@ -68,7 +68,7 @@ public function onDynamicRoutes(RouteBuildEvent $event) { */ public function onAlterRoutes(RouteBuildEvent $event) { $collection = $event->getRouteCollection(); - $this->alterRoutes($collection, $event->getModule()); + return $this->alterRoutes($collection, $event->getModule()); } } diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestEventSubscriber.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestEventSubscriber.php index 552398b..20215fb 100644 --- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestEventSubscriber.php +++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestEventSubscriber.php @@ -50,9 +50,8 @@ public function onKernelRequest(GetResponseEvent $event) { * {@inheritdoc} */ public static function getSubscribedEvents() { + $events = parent::getSubscribedEvents(); $events[KernelEvents::REQUEST][] = array('onKernelRequest'); - $events[RoutingEvents::DYNAMIC] = 'onDynamicRoutes'; - $events[RoutingEvents::ALTER] = 'onAlterRoutes'; return $events; }