mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 08:14:03 +02:00
Module.php: Allow modules to provide configurable navigation items
refs #5600
This commit is contained in:
parent
a1b219f97d
commit
1be6dc0553
@ -221,6 +221,13 @@ class Module
|
|||||||
*/
|
*/
|
||||||
protected $userGroupBackends = array();
|
protected $userGroupBackends = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This module's configurable navigation items
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $navigationItems = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new module object
|
* Create a new module object
|
||||||
*
|
*
|
||||||
@ -875,6 +882,17 @@ class Module
|
|||||||
return $this->userGroupBackends;
|
return $this->userGroupBackends;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return this module's configurable navigation items
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getNavigationItems()
|
||||||
|
{
|
||||||
|
$this->launchConfigScript();
|
||||||
|
return $this->navigationItems;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide a named permission
|
* Provide a named permission
|
||||||
*
|
*
|
||||||
@ -979,6 +997,19 @@ class Module
|
|||||||
return $this;
|
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
|
* Register module namespaces on our class loader
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user