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

Breadcrumb

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

function 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 2072

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();
}

API Navigation

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