Files
nc_bot_webhooks/lib/NavigationProvider.php
kyle b18b996468 refactor(nc_bot_webhooks): rename app display name and logger tags to nc_bot_webhooks and update docs
- appinfo/info.xml: Update app `<name>` to `nc_bot_web_hooks`.
- lib/NavigationProvider.php: Update navigation entry name to `nc_bot_web_hooks`.
- lib/Controller/WebhookController.php: Update all logger tags from `NCbotwebhooks:` to `nc_bot_web_hooks:`.
- lib/Cron/ImageCleanup.php: Update logger tag to `nc_bot_web_hooks:`.
- lib/Service/TalkService.php: Update all logger tags from `NCbotwebhooks:` to `nc_bot_web_hooks:`.
- agent.md: Update references to app name and logger tags.
- architecture.md: Update references to app name.
- INSTALL.md: Update references to app name and example strings.
- README.md: Restructure "Installation" section (split into Initial installation, Updating using git, Local update), add "Debugging" section with diagnostic grep examples, update app name references.
2026-06-14 15:06:15 -07:00

38 lines
1.1 KiB
PHP

<?php
namespace OCA\Ncbotwebhooks;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUserSession;
use OCP\Navigation\INavigationProvider;
class NavigationProvider implements INavigationProvider {
public function __construct(
private readonly IURLGenerator $urlGenerator,
private readonly IUserSession $userSession,
private readonly IConfig $config,
private readonly IL10N $l10n,
) {}
public function getNavigation(): array {
$user = $this->userSession->getUser();
if ($user === null || !$user->isAdmin()) {
return [];
}
return [
[
'id' => 'nc_bot_webhooks',
'app_id' => 'nc_bot_webhooks',
'type' => 'settings',
'name' => $this->l10n->t('nc_bot_webhooks'),
'href' => $this->urlGenerator->linkToRoute('settings.AdminSettings#index'),
'icon' => $this->urlGenerator->imagePath('nc_bot_webhooks', 'app.svg'),
'order' => 0,
],
];
}
}