function Page::getRoute

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/display/Page.php \Drupal\views\Plugin\views\display\Page::getRoute()
  2. 10 core/modules/views/src/Plugin/views/display/Page.php \Drupal\views\Plugin\views\display\Page::getRoute()
  3. 11.x core/modules/views/src/Plugin/views/display/Page.php \Drupal\views\Plugin\views\display\Page::getRoute()

Overrides PathPluginBase::getRoute

File

core/modules/views/src/Plugin/views/display/Page.php, line 90

Class

Page
The plugin that handles a full page.

Namespace

Drupal\views\Plugin\views\display

Code

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.