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::viewExposedFormBlocks in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Render the exposed form as block.
4 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.
EntityReference::usesExposed in drupal/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/display/EntityReference.php
Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::usesExposed().
RestExport::usesExposed in drupal/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php
Determine if this display uses exposed filters, so the view will know whether or not to build them.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 201
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
      ->usesExposed()) {
      $this->has_exposed = TRUE;
      return TRUE;
    }
    $this->has_exposed = FALSE;
  }
  return $this->has_exposed;
}