You are here

function views_plugin_display::uses_exposed in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 plugins/views_plugin_display.inc \views_plugin_display::uses_exposed()
  2. 7.3 plugins/views_plugin_display.inc \views_plugin_display::uses_exposed()

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

2 calls to views_plugin_display::uses_exposed()
views_plugin_display_attachment::uses_exposed in plugins/views_plugin_display_attachment.inc
Attachment displays only use exposed widgets if they are set to inherit the exposed filter settings of their parent display.
views_plugin_display_block::uses_exposed in plugins/views_plugin_display_block.inc
Block views use exposed widgets only if AJAX is set.
2 methods override views_plugin_display::uses_exposed()
views_plugin_display_attachment::uses_exposed in plugins/views_plugin_display_attachment.inc
Attachment displays only use exposed widgets if they are set to inherit the exposed filter settings of their parent display.
views_plugin_display_block::uses_exposed in plugins/views_plugin_display_block.inc
Block views use exposed widgets only if AJAX is set.

File

plugins/views_plugin_display.inc, line 71
Contains the base display plugin.

Class

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

Code

function uses_exposed() {
  if (!isset($this->has_exposed)) {
    foreach (array(
      'field',
      'filter',
    ) as $type) {
      foreach ($this->view->{$type} as $key => $handler) {
        if ($handler
          ->is_exposed()) {

          // one is all we need; if we find it, return true.
          $this->has_exposed = TRUE;
          return TRUE;
        }
      }
    }
    $this->has_exposed = FALSE;
  }
  return $this->has_exposed;
}