You are here

public function InputRequired::query in Views (for Drupal 7) 8.3

Add anything to the query that we might need to.

Overrides ExposedFormPluginBase::query

File

lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php, line 95
Definition of Drupal\views\Plugin\views\exposed_form\InputRequired.

Class

InputRequired
Exposed form plugin that provides an exposed form with required input.

Namespace

Drupal\views\Plugin\views\exposed_form

Code

public function query() {
  if (!$this
    ->exposed_filter_applied()) {

    // We return with no query; this will force the empty text.
    $this->view->built = TRUE;
    $this->view->executed = TRUE;
    $this->view->result = array();
  }
  else {
    parent::query();
  }
}