From 8ca6cc32b2c789a3149861159ad258f2cb9491e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:39:39 +0200 Subject: Adding upstream version 2.11.4. Signed-off-by: Daniel Baumann --- .../Application/Modules/DashboardContainer.php | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 library/Icinga/Application/Modules/DashboardContainer.php (limited to 'library/Icinga/Application/Modules/DashboardContainer.php') diff --git a/library/Icinga/Application/Modules/DashboardContainer.php b/library/Icinga/Application/Modules/DashboardContainer.php new file mode 100644 index 0000000..f3c8bc6 --- /dev/null +++ b/library/Icinga/Application/Modules/DashboardContainer.php @@ -0,0 +1,58 @@ +dashlets = $dashlets; + return $this; + } + + /** + * Return this dashboard's dashlets + * + * @return array + */ + public function getDashlets() + { + return $this->dashlets ?: array(); + } + + /** + * Add a new dashlet + * + * @param string $name + * @param string $url + * @param int $priority + * + * @return $this + */ + public function add($name, $url, $priority = null) + { + $this->dashlets[$name] = [ + 'url' => $url, + 'priority' => $priority + ]; + return $this; + } +} -- cgit v1.2.3