protected function Page::getRoute in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/display/Page.php \Drupal\views\Plugin\views\display\Page::getRoute()
Generates a route entry for a given view and display.
Parameters
string $view_id: The ID of the view.
string $display_id: The current display ID.
Return value
\Symfony\Component\Routing\Route The route for the view.
Overrides PathPluginBase::getRoute
File
- core/
modules/ views/ src/ Plugin/ views/ display/ Page.php, line 106
Class
- Page
- The plugin that handles a full page.
Namespace
Drupal\views\Plugin\views\displayCode
protected function getRoute($view_id, $display_id) {
$route = parent::getRoute($view_id, $display_id);
// Explicitly set HTML as the format for Page displays.
$route
->setRequirement('_format', 'html');
return $route;
}