function view::get_exposed_input
Same name in other branches
- 6.x-3.x includes/view.inc \view::get_exposed_input()
Figure out what the exposed input for this view is.
File
-
includes/
view.inc, line 467
Class
- view
- An object to contain all of the data to generate a view.
Code
public function get_exposed_input() {
if (empty($this->exposed_input)) {
$this->exposed_input = array();
// If filters are not overridden, store the 'remember' settings on the
// default display. If they are, store them on this display. This way,
// multiple displays in the same view can share the same filters and
// remember settings.
$display_id = $this->display_handler
->is_defaulted('filters') ? 'default' : $this->current_display;
// Start with remembered input via session.
if (!empty($_SESSION['views'][$this->name][$display_id])) {
$this->exposed_input = $_SESSION['views'][$this->name][$display_id];
}
// Fetch exposed input values from $_GET. Overwrite if clashing.
foreach ($_GET as $key => $value) {
if (!in_array($key, array(
'page',
'q',
))) {
$this->exposed_input[$key] = $value;
}
}
}
return $this->exposed_input;
}