function DisplayRouterInterface::alterRoutes

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/display/DisplayRouterInterface.php \Drupal\views\Plugin\views\display\DisplayRouterInterface::alterRoutes()
  2. 8.9.x core/modules/views/src/Plugin/views/display/DisplayRouterInterface.php \Drupal\views\Plugin\views\display\DisplayRouterInterface::alterRoutes()
  3. 10 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: The route 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 35

Class

DisplayRouterInterface
Defines an interface for displays that can collect routes.

Namespace

Drupal\views\Plugin\views\display

Code

public function alterRoutes(RouteCollection $collection);

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