diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/appconfig.php | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/config/appconfig.php b/config/appconfig.php index 9b3f80a1d..bef117da9 100644 --- a/config/appconfig.php +++ b/config/appconfig.php @@ -96,22 +96,24 @@ class AppConfig { */ public function registerNavigation() { if (array_key_exists('navigation', $this->config)) { - $nav =& $this->config['navigation']; - - $navConfig = [ - 'id' => $this->config['id'], - 'order' => $nav['order'], - 'name' => $nav['name'] - ]; - - $navConfig['href'] = $this->urlGenerator->linkToRoute( - $nav['route'] - ); - $navConfig['icon'] = $this->urlGenerator->imagePath( - $this->config['id'], $nav['icon'] - ); - - $this->navigationManager->add($navConfig); + $this->navigationManager->add(function () { + $nav =& $this->config['navigation']; + + $navConfig = [ + 'id' => $this->config['id'], + 'order' => $nav['order'], + 'name' => $nav['name'] + ]; + + $navConfig['href'] = $this->urlGenerator->linkToRoute( + $nav['route'] + ); + $navConfig['icon'] = $this->urlGenerator->imagePath( + $this->config['id'], $nav['icon'] + ); + + return $navConfig; + }); } } |