-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Expand file tree
/
Copy pathConfigLexicon.php
More file actions
119 lines (108 loc) · 2.8 KB
/
Copy pathConfigLexicon.php
File metadata and controls
119 lines (108 loc) · 2.8 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Theming;
use OCP\Config\Lexicon\Entry;
use OCP\Config\Lexicon\ILexicon;
use OCP\Config\Lexicon\Strictness;
use OCP\Config\ValueType;
/**
* Config Lexicon for theming.
*
* Please Add & Manage your Config Keys in that file and keep the Lexicon up to date!
*
* {@see ILexicon}
*/
class ConfigLexicon implements ILexicon {
/** The cache buster index */
public const CACHE_BUSTER = 'cachebuster';
public const USER_THEMING_DISABLED = 'disable-user-theming';
/** Name of the software running on this instance (usually "Nextcloud") */
public const PRODUCT_NAME = 'productName';
/** Short name of this instance */
public const INSTANCE_NAME = 'name';
/** Slogan of this instance */
public const INSTANCE_SLOGAN = 'slogan';
/** Imprint URL of this instance */
public const INSTANCE_IMPRINT_URL = 'imprintUrl';
/** Privacy URL of this instance */
public const INSTANCE_PRIVACY_URL = 'privacyUrl';
// legacy theming
/** Base URL of this instance */
public const BASE_URL = 'url';
/** Base URL for documentation */
public const DOC_BASE_URL = 'docBaseUrl';
#[\Override]
public function getStrictness(): Strictness {
return Strictness::NOTICE;
}
#[\Override]
public function getAppConfigs(): array {
return [
// internals
new Entry(
self::CACHE_BUSTER,
ValueType::INT,
defaultRaw: 0,
definition: 'The current cache buster key for theming assets.',
),
new Entry(
self::USER_THEMING_DISABLED,
ValueType::BOOL,
defaultRaw: false,
definition: 'Whether user theming is disabled.',
),
// instance theming
new Entry(
self::PRODUCT_NAME,
ValueType::STRING,
defaultRaw: 'Nextcloud',
definition: 'The name of the software running on this instance (usually "Nextcloud").',
),
new Entry(
self::INSTANCE_NAME,
ValueType::STRING,
defaultRaw: '',
definition: 'Short name of this instance.',
),
new Entry(
self::INSTANCE_SLOGAN,
ValueType::STRING,
defaultRaw: '',
definition: 'Slogan of this instance.',
),
new Entry(
self::INSTANCE_IMPRINT_URL,
ValueType::STRING,
defaultRaw: '',
definition: 'Imprint URL of this instance.',
),
new Entry(
self::INSTANCE_PRIVACY_URL,
ValueType::STRING,
defaultRaw: '',
definition: 'Privacy URL of this instance.',
),
// legacy theming
new Entry(
self::BASE_URL,
ValueType::STRING,
defaultRaw: '',
definition: 'Base URL of this instance.',
),
new Entry(
self::DOC_BASE_URL,
ValueType::STRING,
defaultRaw: '',
definition: 'Base URL for documentation.',
),
];
}
#[\Override]
public function getUserConfigs(): array {
return [];
}
}