diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 3f6bc754c3..911fd058c4 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -221,6 +221,13 @@ class Module */ protected $userGroupBackends = array(); + /** + * This module's configurable navigation items + * + * @var array + */ + protected $navigationItems = array(); + /** * Create a new module object * @@ -875,6 +882,17 @@ public function getUserGroupBackends() return $this->userGroupBackends; } + /** + * Return this module's configurable navigation items + * + * @return array + */ + public function getNavigationItems() + { + $this->launchConfigScript(); + return $this->navigationItems; + } + /** * Provide a named permission * @@ -979,6 +997,19 @@ protected function provideUserGroupBackend($identifier, $className) return $this; } + /** + * Provide a new type of configurable navigation item + * + * @param string $type + * + * @return $this + */ + protected function provideNavigationItem($type) + { + $this->navigationItems[] = $type; + return $this; + } + /** * Register module namespaces on our class loader *