You are here

protected function PathPluginBase::overrideApplies in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase::overrideApplies()
  2. 9 core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase::overrideApplies()

Determines whether the view overrides the given route.

Parameters

string $view_path: The path of the view.

\Symfony\Component\Routing\Route $view_route: The route of the view.

\Symfony\Component\Routing\Route $route: The route itself.

Return value

bool TRUE, when the view should override the given route.

1 call to PathPluginBase::overrideApplies()
PathPluginBase::alterRoutes in core/modules/views/src/Plugin/views/display/PathPluginBase.php
Alters a collection of routes and replaces definitions to the view.
1 method overrides PathPluginBase::overrideApplies()
RestExport::overrideApplies in core/modules/rest/src/Plugin/views/display/RestExport.php
Determines whether the view overrides the given route.

File

core/modules/views/src/Plugin/views/display/PathPluginBase.php, line 247

Class

PathPluginBase
The base display plugin for path/callbacks. This is used for pages and feeds.

Namespace

Drupal\views\Plugin\views\display

Code

protected function overrideApplies($view_path, Route $view_route, Route $route) {
  return (!$route
    ->hasRequirement('_format') || $route
    ->getRequirement('_format') === 'html') && $this
    ->overrideAppliesPathAndMethod($view_path, $view_route, $route);
}