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

Breadcrumb

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

function 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);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal