1.20.x 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.
File
- modules/
views/ plugins/ views_plugin_display.inc, line 285 - 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 ($this->handlers as $type => $value) {
foreach ($this->view->$type as $id => $handler) {
if ($handler->can_expose() && $handler->is_exposed()) {
// one is all we need; if we find it, return true.
$this->has_exposed = TRUE;
return TRUE;
}
}
}
$pager = $this->get_plugin('pager');
if (isset($pager) && $pager->uses_exposed()) {
$this->has_exposed = TRUE;
return TRUE;
}
$this->has_exposed = FALSE;
}
return $this->has_exposed;
}