Add getAll to public INavigationManager

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-01-29 12:17:47 +01:00
parent 96480af159
commit b6da8c5279
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF
2 changed files with 10 additions and 1 deletions

View file

@ -108,7 +108,7 @@ class NavigationManager implements INavigationManager {
* @param string $type
* @return array an array of the added entries
*/
public function getAll($type = 'link') {
public function getAll(string $type = 'link'): array {
$this->init();
foreach ($this->closureEntries as $c) {
$this->add($c());

View file

@ -57,4 +57,13 @@ interface INavigationManager {
* @since 6.0.0
*/
public function setActiveEntry($appId);
/**
* Get a list of navigation entries
*
* @param bool $absolute set to true if links to navigation entries should be converted to absolute urls
* @return array
* @since 14.0.0
*/
public function getAll(string $type = 'link'): array;
}