function ViewExecutable::getPath

Same name in other branches
  1. 9 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::getPath()
  2. 10 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::getPath()
  3. 11.x core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::getPath()

Gets the base path used for this view.

Return value

string|false The base path used for the view or FALSE if setting the display fails.

1 call to ViewExecutable::getPath()
ViewExecutable::getUrl in core/modules/views/src/ViewExecutable.php
Gets the URL for the current view.

File

core/modules/views/src/ViewExecutable.php, line 2024

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

public function getPath() {
    if (!empty($this->override_path)) {
        return $this->override_path;
    }
    if (empty($this->display_handler)) {
        if (!$this->setDisplay('default')) {
            return FALSE;
        }
    }
    return $this->display_handler
        ->getPath();
}

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