interface FilterInterface in Drupal 10
Same name in this branch
- 10 core/lib/Drupal/Core/Routing/FilterInterface.php \Drupal\Core\Routing\FilterInterface
- 10 core/modules/filter/src/Plugin/FilterInterface.php \Drupal\filter\Plugin\FilterInterface
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Routing/FilterInterface.php \Drupal\Core\Routing\FilterInterface
- 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
- interface \Drupal\Core\Routing\FilterInterface
Expanded class hierarchy of FilterInterface
All classes that implement FilterInterface
2 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
File
- core/
lib/ Drupal/ Core/ Routing/ FilterInterface.php, line 11
Namespace
Drupal\Core\RoutingView source
interface FilterInterface {
/**
* Filters the route collection against a request and returns all matching
* routes.
*
* @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 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);
}