-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathImagickSetupCheck.php
More file actions
39 lines (31 loc) · 943 Bytes
/
ImagickSetupCheck.php
File metadata and controls
39 lines (31 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Libresign\SetupCheck;
use OCP\IL10N;
use OCP\SetupCheck\ISetupCheck;
use OCP\SetupCheck\SetupResult;
class ImagickSetupCheck implements ISetupCheck {
private IL10N $l10n;
public function __construct(IL10N $l10n) {
$this->l10n = $l10n;
}
public function getName(): string {
return $this->l10n->t('Imagick PHP extension');
}
public function getCategory(): string {
return 'system';
}
public function run(): SetupResult {
if (!extension_loaded('imagick')) {
return SetupResult::info(
$this->l10n->t('Imagick extension is not loaded'),
$this->l10n->t('Install php-imagick to enable visible signatures, background images, and signature element rendering.')
);
}
return SetupResult::success($this->l10n->t('Imagick extension is loaded'));
}
}