Allow apps to register a setting via info.xml

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-03-26 20:37:39 +02:00
parent 433958e2e3
commit 7cc5130e82
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 2 additions and 0 deletions

View File

@ -258,6 +258,7 @@ class NavigationManager implements INavigationManager {
}
$l = $this->l10nFac->get($app);
$order = isset($nav['order']) ? $nav['order'] : 100;
$type = isset($nav['type']) ? $nav['type'] : 'link';
$route = $this->urlGenerator->linkToRoute($nav['route']);
$icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg';
foreach ([$icon, "$app.svg"] as $i) {
@ -277,6 +278,7 @@ class NavigationManager implements INavigationManager {
'order' => $order,
'href' => $route,
'icon' => $icon,
'type' => $type,
'name' => $l->t($nav['name']),
]);
}