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

Breadcrumb

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

function RouteCollection::setMethods

Sets the HTTP methods (e.g. 'POST') all child routes are restricted to.

Parameters

string|string[] $methods The method or an array of methods:

File

vendor/symfony/routing/RouteCollection.php, line 322

Class

RouteCollection
A RouteCollection represents a set of Route instances.

Namespace

Symfony\Component\Routing

Code

public function setMethods(string|array $methods) : void {
    foreach ($this->routes as $route) {
        $route->setMethods($methods);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal