Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
1 / 1 |
| AdminSettings | |
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getID | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getPriority | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getIcon | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | /** |
| 5 | * SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors |
| 6 | * SPDX-License-Identifier: AGPL-3.0-or-later |
| 7 | */ |
| 8 | |
| 9 | namespace OCA\Libresign\Settings; |
| 10 | |
| 11 | use OCA\Libresign\AppInfo\Application; |
| 12 | use OCP\IL10N; |
| 13 | use OCP\IURLGenerator; |
| 14 | use OCP\Settings\IIconSection; |
| 15 | |
| 16 | class AdminSettings implements IIconSection { |
| 17 | public function __construct( |
| 18 | private IL10N $l, |
| 19 | private IURLGenerator $urlGenerator, |
| 20 | ) { |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * {@inheritdoc} |
| 25 | */ |
| 26 | #[\Override] |
| 27 | public function getID(): string { |
| 28 | return Application::APP_ID; |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * {@inheritdoc} |
| 33 | */ |
| 34 | #[\Override] |
| 35 | public function getName(): string { |
| 36 | // TRANSLATORS Nextcloud Administration settings section name for the LibreSign digital signature app. |
| 37 | return $this->l->t('LibreSign'); |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * {@inheritdoc} |
| 42 | */ |
| 43 | #[\Override] |
| 44 | public function getPriority(): int { |
| 45 | return 60; |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * {@inheritdoc} |
| 50 | */ |
| 51 | #[\Override] |
| 52 | public function getIcon(): string { |
| 53 | return $this->urlGenerator->imagePath(Application::APP_ID, 'app-dark.svg'); |
| 54 | } |
| 55 | } |