function TermRouteContext::__construct

Same name in other branches
  1. 9 core/modules/taxonomy/src/ContextProvider/TermRouteContext.php \Drupal\taxonomy\ContextProvider\TermRouteContext::__construct()
  2. 10 core/modules/taxonomy/src/ContextProvider/TermRouteContext.php \Drupal\taxonomy\ContextProvider\TermRouteContext::__construct()

Constructs a new TermRouteContext.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match object.

File

core/modules/taxonomy/src/ContextProvider/TermRouteContext.php, line 34

Class

TermRouteContext
Sets the current taxonomy term as a context on taxonomy term routes.

Namespace

Drupal\taxonomy\ContextProvider

Code

public function __construct(RouteMatchInterface $route_match) {
    $this->routeMatch = $route_match;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.