feat: allow global settings as fallback when user has not defined any

This commit is contained in:
2024-08-09 21:36:02 +02:00
parent 2d10b81650
commit 6b53ccb88e
10 changed files with 193 additions and 35 deletions

View File

@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace OCA\PrideFlags\Settings;
use OCA\PrideFlags\AppConstants;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\Settings\IIConSection;
class AdminSection implements IIconSection {
public function __construct(private IL10N $l10n, private IURLGenerator $urlGenerator) {}
public function getID(): string {
return AppConstants::APP_ID;
}
public function getName(): string {
return 'Pride Flags';
}
public function getPriority(): int {
return 100;
}
public function getIcon(): string {
return $this->urlGenerator->imagePath('core', 'actions/settings-dark.svg');
}
}