You are here

public function ViewExecutable::getQuery in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::getQuery()

Gets the current query plugin.

Return value

\Drupal\views\Plugin\views\query\QueryPluginBase The current query plugin.

File

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

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

public function getQuery() {
  if (!isset($this->query)) {
    $this
      ->initQuery();
  }
  return $this->query;
}