. * */ namespace OCA\Tasks\AppInfo; if(\OCP\App::isEnabled('calendar')) { \OC::$server->getNavigationManager()->add(function () { $urlGenerator = \OC::$server->getURLGenerator(); return [ 'id' => 'tasks', 'order' => 100, 'href' => $urlGenerator->linkToRoute('tasks.page.index'), 'icon' => $urlGenerator->imagePath('tasks', 'tasks.svg'), '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); }