From 0ca6e04a5a85a1cd286d33d109b2bb604c1d1189 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 16 Sep 2015 13:51:35 +0200 Subject: [PATCH] Module: Allow to pass a label for a custom navigation item type refs #5600 --- library/Icinga/Application/Modules/Module.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 29a3b78dc..f8a1b3d05 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -1007,15 +1007,16 @@ class Module } /** - * Provide a new type of configurable navigation item + * Provide a new type of configurable navigation item with a optional label * * @param string $type + * @param string $label * * @return $this */ - protected function provideNavigationItem($type) + protected function provideNavigationItem($type, $label = null) { - $this->navigationItems[] = $type; + $this->navigationItems[$type] = $label ?: $type; return $this; }