Module: Allow to pass a label for a custom navigation item type

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-16 13:51:35 +02:00
parent 2cd774018c
commit 0ca6e04a5a
1 changed files with 4 additions and 3 deletions

View File

@ -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 $type
* @param string $label
* *
* @return $this * @return $this
*/ */
protected function provideNavigationItem($type) protected function provideNavigationItem($type, $label = null)
{ {
$this->navigationItems[] = $type; $this->navigationItems[$type] = $label ?: $type;
return $this; return $this;
} }