function Page::buildBasicRenderable

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

Overrides DisplayPluginBase::buildBasicRenderable

2 calls to Page::buildBasicRenderable()
PageTest::testBuildBasicRenderable in core/modules/views/tests/src/Unit/Plugin/display/PageTest.php
@covers ::buildBasicRenderable
PageTest::testBuildBasicRenderableWithMissingRoute in core/modules/views/tests/src/Unit/Plugin/display/PageTest.php
@covers ::buildBasicRenderable

File

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

Class

Page
The plugin that handles a full page.

Namespace

Drupal\views\Plugin\views\display

Code

public static function buildBasicRenderable($view_id, $display_id, array $args = [], ?Route $route = NULL) {
    $build = parent::buildBasicRenderable($view_id, $display_id, $args);
    if ($route) {
        $build['#view_id'] = $route->getDefault('view_id');
        $build['#view_display_plugin_id'] = $route->getOption('_view_display_plugin_id');
        $build['#view_display_show_admin_links'] = $route->getOption('_view_display_show_admin_links');
    }
    else {
        throw new \BadFunctionCallException('Missing route parameters.');
    }
    return $build;
}

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