Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RouteMethodSubscriber.php

function RouteMethodSubscriber::getSubscribedEvents

Overrides EventSubscriberInterface::getSubscribedEvents

File

core/lib/Drupal/Core/EventSubscriber/RouteMethodSubscriber.php, line 38

Class

RouteMethodSubscriber
Provides a default value for the HTTP method restriction on routes.

Namespace

Drupal\Core\EventSubscriber

Code

public static function getSubscribedEvents() : array {
    // Set a higher priority to ensure that routes get the default HTTP methods
    // as early as possible.
    $events[RoutingEvents::ALTER][] = [
        'onRouteBuilding',
        5000,
    ];
    return $events;
}
RSS feed
Powered by Drupal