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

Breadcrumb

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

function Router::setContext

Overrides RequestContextAwareInterface::setContext

File

vendor/symfony/routing/Router.php, line 145

Class

Router
The Router class is an example of the integration of all pieces of the routing system for easier use.

Namespace

Symfony\Component\Routing

Code

public function setContext(RequestContext $context) : void {
    $this->context = $context;
    if (isset($this->matcher)) {
        $this->getMatcher()
            ->setContext($context);
    }
    if (isset($this->generator)) {
        $this->getGenerator()
            ->setContext($context);
    }
}
RSS feed
Powered by Drupal