Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DisplayPluginBase.php

function DisplayPluginBase::getRoutedDisplay

Overrides DisplayPluginInterface::getRoutedDisplay

1 call to DisplayPluginBase::getRoutedDisplay()
DisplayPluginBase::validate in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Validate that the plugin is correct and can be saved.

File

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 750

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

public function getRoutedDisplay() {
    // If this display has a route, return this display.
    if ($this instanceof DisplayRouterInterface) {
        return $this;
    }
    // If the display does not have a route (e.g. a block display), get the
    // route for the linked display.
    $display_id = $this->getLinkDisplay();
    if ($display_id && $this->view->displayHandlers
        ->has($display_id) && is_object($this->view->displayHandlers
        ->get($display_id))) {
        return $this->view->displayHandlers
            ->get($display_id)
            ->getRoutedDisplay();
    }
    // No routed display exists, so return NULL
    return NULL;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal