Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaimund Schlüßler <raimund.schluessler@googlemail.com>2015-07-12 13:10:33 +0300
committerRaimund Schlüßler <raimund.schluessler@googlemail.com>2015-07-12 13:10:33 +0300
commitdc78362326ed3b5744b117c0d327f0607010455c (patch)
treebe2a859fdf66be84b04b7585d0526d837489024c /appinfo
parent8f92482fd77a38f48a11ef0d9b2425b54a08ae5a (diff)
Use closure for navigation entry
See https://github.com/owncloud/core/pull/14931
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/app.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 8f404ed2..b568ab0e 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -23,18 +23,20 @@
namespace OCA\Tasks\AppInfo;
if(\OCP\App::isEnabled('calendar')) {
- \OC::$server->getNavigationManager()->add(array(
- // the string under which your app will be referenced in owncloud
- 'id' => 'tasks',
+ \OC::$server->getNavigationManager()->add(function () {
+ $urlGenerator = \OC::$server->getURLGenerator();
+ return [
+ 'id' => 'tasks',
- 'order' => 100,
+ 'order' => 100,
- 'href' => \OC::$server->getURLGenerator()->linkToRoute('tasks.page.index'),
+ 'href' => $urlGenerator->linkToRoute('tasks.page.index'),
- 'icon' => \OC::$server->getURLGenerator()->imagePath('tasks', 'tasks.svg'),
+ 'icon' => $urlGenerator->imagePath('tasks', 'tasks.svg'),
- 'name' => \OC_L10N::get('tasks')->t('Tasks')
- ));
+ 'name' => \OC::$server->getL10N('tasks')->t('Tasks'),
+ ];
+ });
} else {
$msg = 'Can not enable the Tasks app because the Calendar App is disabled.';
\OCP\Util::writeLog('tasks', $msg, \OCP\Util::ERROR);