1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* CMS Pico - Integration of Pico within your files to create websites. |
4
|
|
|
* |
5
|
|
|
* This file is licensed under the Affero General Public License version 3 or |
6
|
|
|
* later. See the COPYING file. |
7
|
|
|
* |
8
|
|
|
* @author Maxence Lange <[email protected]> |
9
|
|
|
* @copyright 2017 |
10
|
|
|
* @license GNU AGPL version 3 or any later version |
11
|
|
|
* |
12
|
|
|
* This program is free software: you can redistribute it and/or modify |
13
|
|
|
* it under the terms of the GNU Affero General Public License as |
14
|
|
|
* published by the Free Software Foundation, either version 3 of the |
15
|
|
|
* License, or (at your option) any later version. |
16
|
|
|
* |
17
|
|
|
* This program is distributed in the hope that it will be useful, |
18
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
19
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20
|
|
|
* GNU Affero General Public License for more details. |
21
|
|
|
* |
22
|
|
|
* You should have received a copy of the GNU Affero General Public License |
23
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
24
|
|
|
* |
25
|
|
|
*/ |
26
|
|
|
|
27
|
|
|
namespace OCA\CMSPico\Settings; |
28
|
|
|
|
29
|
|
|
use OCA\CMSPico\AppInfo\Application; |
30
|
|
|
use OCP\IL10N; |
31
|
|
|
use OCP\IURLGenerator; |
32
|
|
|
use OCP\Settings\IIconSection; |
|
|
|
|
33
|
|
|
|
34
|
|
View Code Duplication |
class AdminSection implements IIconSection { |
|
|
|
|
35
|
|
|
|
36
|
|
|
/** @var IL10N */ |
37
|
|
|
private $l10n; |
38
|
|
|
|
39
|
|
|
/** @var IURLGenerator */ |
40
|
|
|
private $urlGenerator; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @param IL10N $l10n |
44
|
|
|
* @param IURLGenerator $urlGenerator |
45
|
|
|
*/ |
46
|
|
|
public function __construct(IL10N $l10n, |
47
|
|
|
IURLGenerator $urlGenerator) { |
48
|
|
|
$this->l10n = $l10n; |
49
|
|
|
$this->urlGenerator = $urlGenerator; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* {@inheritdoc} |
54
|
|
|
*/ |
55
|
|
|
public function getID() { |
56
|
|
|
return Application::APP_NAME; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* {@inheritdoc} |
61
|
|
|
*/ |
62
|
|
|
public function getName() { |
63
|
|
|
return $this->l10n->t('Pico CMS'); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* {@inheritdoc} |
68
|
|
|
*/ |
69
|
|
|
public function getPriority() { |
70
|
|
|
return 75; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* {@inheritdoc} |
75
|
|
|
*/ |
76
|
|
|
public function getIcon() { |
77
|
|
|
return $this->urlGenerator->imagePath(Application::APP_NAME, 'pico_cms.svg'); |
78
|
|
|
} |
79
|
|
|
} |
80
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths