public function DisplayPluginBase::usesExposed

Determine if this display uses exposed filters, so the view will know whether or not to build them.

5 calls to DisplayPluginBase::usesExposed()
Attachment::usesExposed in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/Attachment.php
Attachment displays only use exposed widgets if they are set to inherit the exposed filter settings of their parent display.
Block::buildOptionsForm in drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
Provide the default form for setting options.
Block::usesExposed in drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
Block views use exposed widgets only if AJAX is set.
DisplayPluginBase::preExecute in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Set up any variables on the view prior to execution. These are separated from execute because they are extremely common and unlikely to be overridden on an individual display.
DisplayPluginBase::viewSpecialBlocks in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Render any special blocks provided for this display.
2 methods override DisplayPluginBase::usesExposed()
Attachment::usesExposed in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/Attachment.php
Attachment displays only use exposed widgets if they are set to inherit the exposed filter settings of their parent display.
Block::usesExposed in drupal/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php
Block views use exposed widgets only if AJAX is set.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 199
Contains Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Namespace

Drupal\views\Plugin\views\display

Code

public function usesExposed() {
  if (!isset($this->has_exposed)) {
    foreach ($this->handlers as $type => $value) {
      foreach ($this->view->{$type} as $id => $handler) {
        if ($handler
          ->canExpose() && $handler
          ->isExposed()) {

          // one is all we need; if we find it, return true.
          $this->has_exposed = TRUE;
          return TRUE;
        }
      }
    }
    $pager = $this
      ->getPlugin('pager');
    if (isset($pager) && $pager
      ->uses_exposed()) {
      $this->has_exposed = TRUE;
      return TRUE;
    }
    $this->has_exposed = FALSE;
  }
  return $this->has_exposed;
}