Allow apps to register a setting via info.xml
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
433958e2e3
commit
7cc5130e82
|
@ -258,6 +258,7 @@ class NavigationManager implements INavigationManager {
|
||||||
}
|
}
|
||||||
$l = $this->l10nFac->get($app);
|
$l = $this->l10nFac->get($app);
|
||||||
$order = isset($nav['order']) ? $nav['order'] : 100;
|
$order = isset($nav['order']) ? $nav['order'] : 100;
|
||||||
|
$type = isset($nav['type']) ? $nav['type'] : 'link';
|
||||||
$route = $this->urlGenerator->linkToRoute($nav['route']);
|
$route = $this->urlGenerator->linkToRoute($nav['route']);
|
||||||
$icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg';
|
$icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg';
|
||||||
foreach ([$icon, "$app.svg"] as $i) {
|
foreach ([$icon, "$app.svg"] as $i) {
|
||||||
|
@ -277,6 +278,7 @@ class NavigationManager implements INavigationManager {
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
'href' => $route,
|
'href' => $route,
|
||||||
'icon' => $icon,
|
'icon' => $icon,
|
||||||
|
'type' => $type,
|
||||||
'name' => $l->t($nav['name']),
|
'name' => $l->t($nav['name']),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue