You are here

public function ViewsDisplayBase::getCurrentRouteMatch in Search API 8

Retrieves the current route match service.

Return value

\Drupal\Core\Routing\RouteMatchInterface The current route match service.

1 call to ViewsDisplayBase::getCurrentRouteMatch()
ViewsDisplayBase::isRenderedInCurrentRequest in src/Plugin/search_api/display/ViewsDisplayBase.php
Returns true if the display is being rendered in the current request.

File

src/Plugin/search_api/display/ViewsDisplayBase.php, line 39

Class

ViewsDisplayBase
Provides a base class for Views displays.

Namespace

Drupal\search_api\Plugin\search_api\display

Code

public function getCurrentRouteMatch() {
  return $this->currentRouteMatch ?: \Drupal::routeMatch();
}