You are here

public function DisplayPluginBase::getPath in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::getPath()

Returns the base path to use for this display.

This can be overridden for displays that do strange things with the path.

Overrides DisplayPluginInterface::getPath

1 method overrides DisplayPluginBase::getPath()
PathPluginBase::getPath in core/modules/views/src/Plugin/views/display/PathPluginBase.php
Returns the base path to use for this display.

File

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 727
Contains \Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

public function getPath() {
  if ($this
    ->hasPath()) {
    return $this
      ->getOption('path');
  }
  $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)
      ->getPath();
  }
}