From 118abbe980b8db1aa972ae13e17da64d0f3df518 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sat, 15 Nov 2014 22:54:40 +0100 Subject: [PATCH] FilterEditor: url-setter and protected lazy-shortcut --- library/Icinga/Web/Widget/FilterEditor.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/library/Icinga/Web/Widget/FilterEditor.php b/library/Icinga/Web/Widget/FilterEditor.php index ecf81abb5..3cc5a4f5d 100644 --- a/library/Icinga/Web/Widget/FilterEditor.php +++ b/library/Icinga/Web/Widget/FilterEditor.php @@ -56,6 +56,20 @@ class FilterEditor extends AbstractWidget return $this->filter; } + public function setUrl($url) + { + $this->url = $url; + return $this; + } + + protected function url() + { + if ($this->url === null) { + $this->url = Url::fromRequest(); + } + return $this->url; + } + protected function select($name, $list, $selected, $attributes = null) { $view = $this->view();