function InputRequired::exposed_filter_applied

2 calls to InputRequired::exposed_filter_applied()
InputRequired::pre_render in drupal/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php
InputRequired::query in drupal/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php
Add anything to the query that we might need to.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php, line 53
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

function exposed_filter_applied() {
  static $cache = NULL;
  if (!isset($cache)) {
    $view = $this->view;
    if (is_array($view->filter) && count($view->filter)) {
      foreach ($view->filter as $filter_id => $filter) {
        if ($filter
          ->isExposed()) {
          $identifier = $filter->options['expose']['identifier'];
          if (isset($view->exposed_input[$identifier])) {
            $cache = TRUE;
            return $cache;
          }
        }
      }
    }
    $cache = FALSE;
  }
  return $cache;
}