You are here

public function DisplayRouterInterface::alterRoutes in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/display/DisplayRouterInterface.php \Drupal\views\Plugin\views\display\DisplayRouterInterface::alterRoutes()

Alters a collection of routes and replaces definitions to the view.

Most of the collections won't have the needed route, so by the return value the method can specify to break the search.

Parameters

\Symfony\Component\Routing\RouteCollection $collection:

Return value

array Returns a list of "$view_id.$display_id" elements which got overridden.

1 method overrides DisplayRouterInterface::alterRoutes()
PathPluginBase::alterRoutes in core/modules/views/src/Plugin/views/display/PathPluginBase.php
Alters a collection of routes and replaces definitions to the view.

File

core/modules/views/src/Plugin/views/display/DisplayRouterInterface.php, line 34

Class

DisplayRouterInterface
Defines an interface for displays that can collect routes.

Namespace

Drupal\views\Plugin\views\display

Code

public function alterRoutes(RouteCollection $collection);