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

Breadcrumb

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

function DisplayPluginBase::getLinkDisplay

Overrides DisplayPluginInterface::getLinkDisplay

3 calls to DisplayPluginBase::getLinkDisplay()
DisplayPluginBase::getPath in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Returns the base path to use for this display.
DisplayPluginBase::getRoutedDisplay in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Points to the display which can be linked by this display.
DisplayPluginBase::optionsSummary in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
Provides the default summary for options in the views UI.

File

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

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

public function getLinkDisplay() {
    $display_id = $this->getOption('link_display');
    // If unknown, pick the first one.
    if (empty($display_id) || !$this->view->displayHandlers
        ->has($display_id)) {
        foreach ($this->view->displayHandlers as $display_id => $display) {
            if (!empty($display) && $display->hasPath()) {
                return $display_id;
            }
        }
    }
    else {
        return $display_id;
    }
    // Fall-through returns NULL.
}

API Navigation

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