You are here

public function InputRequired::query in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/exposed_form/InputRequired.php \Drupal\views\Plugin\views\exposed_form\InputRequired::query()

Add anything to the query that we might need to.

Overrides ExposedFormPluginBase::query

File

core/modules/views/src/Plugin/views/exposed_form/InputRequired.php, line 107
Contains \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
    ->exposedFilterApplied()) {

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