From b6da8c527998d44264d3486f2d34e34630a97bee Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Mon, 29 Jan 2018 12:17:47 +0100 Subject: Add getAll to public INavigationManager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/NavigationManager.php | 2 +- lib/public/INavigationManager.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index 36bb9b5ee19..8d62ebc8ed8 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -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()); diff --git a/lib/public/INavigationManager.php b/lib/public/INavigationManager.php index 216f8a897d8..344ea47e2e0 100644 --- a/lib/public/INavigationManager.php +++ b/lib/public/INavigationManager.php @@ -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; } -- cgit v1.2.3