function DisplayPluginBase::usesExposed

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::usesExposed()
  2. 8.9.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::usesExposed()
  3. 11.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::usesExposed()

Overrides DisplayPluginInterface::usesExposed

5 calls to DisplayPluginBase::usesExposed()
Attachment::usesExposed in core/modules/views/src/Plugin/views/display/Attachment.php
Block::buildOptionsForm in core/modules/views/src/Plugin/views/display/Block.php
Provide the default form for setting options.
Block::buildOptionsForm in core/modules/views/src/Plugin/views/display/Block.php
Provide the default form for setting options.
DisplayPluginBase::preExecute in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
DisplayPluginBase::viewExposedFormBlocks in core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
3 methods override DisplayPluginBase::usesExposed()
Attachment::usesExposed in core/modules/views/src/Plugin/views/display/Attachment.php
EntityReference::usesExposed in core/modules/views/src/Plugin/views/display/EntityReference.php
RestExport::usesExposed in core/modules/rest/src/Plugin/views/display/RestExport.php

File

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 253

Class

DisplayPluginBase
Base class for views display plugins.

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 $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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.