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

Breadcrumb

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

function AddTrait::__invoke

Adds a route.

Parameters

string|array $path the path, or the localized paths of the route:

File

vendor/symfony/routing/Loader/Configurator/Traits/AddTrait.php, line 53

Class

AddTrait
@author Nicolas Grekas <p@tchwork.com>

Namespace

Symfony\Component\Routing\Loader\Configurator\Traits

Code

public function __invoke(string $name, string|array $path) : RouteConfigurator {
    return $this->add($name, $path);
}

API Navigation

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