From c5ca3b633c2424084b2da37162fcec954e9f2cdb Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sat, 15 Nov 2014 22:57:25 +0100 Subject: [PATCH] FilterEditor: allow additional parameter control We may want to keep additional parameters in our url and ignore other ones when the filter changes --- library/Icinga/Web/Widget/FilterEditor.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/library/Icinga/Web/Widget/FilterEditor.php b/library/Icinga/Web/Widget/FilterEditor.php index ca4c5b63f..d43b27699 100644 --- a/library/Icinga/Web/Widget/FilterEditor.php +++ b/library/Icinga/Web/Widget/FilterEditor.php @@ -24,6 +24,12 @@ class FilterEditor extends AbstractWidget protected $query; + protected $url; + + protected $preserveParams = array(); + + protected $ignoreParams = array(); + /** * @var string */ @@ -76,6 +82,18 @@ class FilterEditor extends AbstractWidget return $this; } + public function ignoreParams() + { + $this->ignoreParams = func_get_args(); + return $this; + } + + public function preserveParams() + { + $this->preserveParams = func_get_args(); + return $this; + } + protected function select($name, $list, $selected, $attributes = null) { $view = $this->view();