function Page::getRoute

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/display/Page.php \Drupal\views\Plugin\views\display\Page::getRoute()
  2. 8.9.x 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 104

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');
    if ($this->getOption('use_admin_theme')) {
        $route->setOption('_admin_route', TRUE);
    }
    return $route;
}

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