Skip to content

Commit

Permalink
Use a closure for the navigation entry, to speed up webdav and ajax c…
Browse files Browse the repository at this point in the history
…alls
  • Loading branch information
nickvergessen committed Mar 16, 2015
1 parent 5e17666 commit a20052a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions appinfo/app.php
Expand Up @@ -27,13 +27,15 @@
$c = $app->getContainer();

// add an navigation entry
$navigationEntry = array(
$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
Expand Down

0 comments on commit a20052a

Please sign in to comment.