return $this->l10n->t('Contacts');
}
- public function getOrder(string $route, array $routeParameters): int {
- if ($route === 'contacts.Page.index') {
- return -1;
+ public function getOrder(string $route, array $routeParameters): ?int {
+ if ($this->appManager->isEnabledForUser('contacts')) {
+ return $route === 'contacts.Page.index' ? -1 : 25;
}
- return 25;
+
+ return null;
}
public function search(IUser $user, ISearchQuery $query): SearchResult {
/**
* @inheritDoc
*/
- public function getOrder(string $route, array $routeParameters): int {
- if ($route === 'calendar.View.index') {
- return -1;
+ public function getOrder(string $route, array $routeParameters): ?int {
+ if ($this->appManager->isEnabledForUser('calendar')) {
+ return $route === 'calendar.View.index' ? -1 : 30;
}
- return 30;
+
+ return null;
}
/**
/**
* @inheritDoc
*/
- public function getOrder(string $route, array $routeParameters): int {
- if ($route === 'tasks.Page.index') {
- return -1;
+ public function getOrder(string $route, array $routeParameters): ?int {
+ if ($this->appManager->isEnabledForUser('tasks')) {
+ return $route === 'tasks.Page.index' ? -1 : 35;
}
- return 35;
+
+ return null;
}
/**