зеркало из https://github.com/nextcloud/activity.git
Use a closure for the navigation entry, to speed up webdav and ajax calls
This commit is contained in:
Родитель
5e17666652
Коммит
a20052a397
|
@ -27,13 +27,15 @@ $app = new Application();
|
|||
$c = $app->getContainer();
|
||||
|
||||
// add an navigation entry
|
||||
$navigationEntry = array(
|
||||
'id' => $c->getAppName(),
|
||||
'order' => 1,
|
||||
'name' => $c->query('ActivityL10N')->t('Activity'),
|
||||
'href' => $c->query('URLGenerator')->linkToRoute('activity.Activities.showList'),
|
||||
'icon' => $c->query('URLGenerator')->imagePath('activity', 'activity.svg'),
|
||||
);
|
||||
$navigationEntry = function () use ($c) {
|
||||
return [
|
||||
'id' => $c->getAppName(),
|
||||
'order' => 1,
|
||||
'name' => $c->query('ActivityL10N')->t('Activity'),
|
||||
'href' => $c->query('URLGenerator')->linkToRoute('activity.Activities.showList'),
|
||||
'icon' => $c->query('URLGenerator')->imagePath('activity', 'activity.svg'),
|
||||
];
|
||||
};
|
||||
$c->getServer()->getNavigationManager()->add($navigationEntry);
|
||||
|
||||
// register the hooks for filesystem operations. All other events from other apps has to be send via the public api
|
||||
|
|
Загрузка…
Ссылка в новой задаче