Module: Allow to pass a label for a custom navigation item type
refs #5600
This commit is contained in:
parent
2cd774018c
commit
0ca6e04a5a
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue