[icinga-checkins] icinga.org: icingaweb2/master: FilterEditor: url-setter and protected lazy-shortcut

git at icinga.org git at icinga.org
Sun Nov 16 00:38:41 CET 2014


Module: icingaweb2
Branch: master
Commit: 118abbe980b8db1aa972ae13e17da64d0f3df518
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=118abbe980b8db1aa972ae13e17da64d0f3df518

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sat Nov 15 22:54:40 2014 +0100

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 ecf81ab..3cc5a4f 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();



More information about the icinga-checkins mailing list