Same name in this branch
  1. 10 core/lib/Drupal/Core/Routing/FilterInterface.php \Drupal\Core\Routing\FilterInterface
  2. 10 core/modules/filter/src/Plugin/FilterInterface.php \Drupal\filter\Plugin\FilterInterface
Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Routing/FilterInterface.php \Drupal\Core\Routing\FilterInterface
  2. 9 core/lib/Drupal/Core/Routing/FilterInterface.php \Drupal\Core\Routing\FilterInterface

A route filter service to filter down the collection of route instances.

Hierarchy

Expanded class hierarchy of FilterInterface

All classes that implement FilterInterface

3 files declare their use of FilterInterface
AcceptHeaderMatcher.php in core/modules/system/tests/modules/accept_header_routing_test/src/Routing/AcceptHeaderMatcher.php
ReadOnlyModeMethodFilter.php in core/modules/jsonapi/src/Routing/ReadOnlyModeMethodFilter.php
RouterUnsupportedTest.php in core/tests/Drupal/Tests/Core/Routing/RouterUnsupportedTest.php

File

core/lib/Drupal/Core/Routing/FilterInterface.php, line 11

Namespace

Drupal\Core\Routing
View source
interface FilterInterface {

  /**
   * Filters the route collection against a request.
   *
   * @param \Symfony\Component\Routing\RouteCollection $collection
   *   The collection against which to match.
   * @param \Symfony\Component\HttpFoundation\Request $request
   *   A Request object against which to match.
   *
   * @return \Symfony\Component\Routing\RouteCollection
   *   A non-empty RouteCollection of matched routes
   *
   * @throws \Symfony\Component\Routing\Exception\ResourceNotFoundException
   *   If none of the routes in $collection matches $request. This is a
   *   performance optimization to not continue the match process when a match
   *   will no longer be possible.
   */
  public function filter(RouteCollection $collection, Request $request);

}

Members

Namesort descending Modifiers Type Description Overrides
FilterInterface::filter public function Filters the route collection against a request. 5