public function DisplayPluginBase::getLinkDisplay

Check to see which display to use when creating links within a view using this display.

2 calls to DisplayPluginBase::getLinkDisplay()
DisplayPluginBase::getPath in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Return the base path to use for this display.
DisplayPluginBase::optionsSummary in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Provide the default summary for options in the views UI.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 725
Contains Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

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
}