Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/config/option/PhabricatorUIConfigOptions.php
12256 views
1
<?php
2
3
final class PhabricatorUIConfigOptions
4
extends PhabricatorApplicationConfigOptions {
5
6
public function getName() {
7
return pht('User Interface');
8
}
9
10
public function getDescription() {
11
return pht('Configure the UI, including colors.');
12
}
13
14
public function getIcon() {
15
return 'fa-magnet';
16
}
17
18
public function getGroup() {
19
return 'core';
20
}
21
22
public function getOptions() {
23
$options = array(
24
'blindigo' => pht('Blindigo'),
25
'red' => pht('Red'),
26
'blue' => pht('Blue'),
27
'green' => pht('Green'),
28
'indigo' => pht('Indigo'),
29
'dark' => pht('Dark'),
30
);
31
32
$example = <<<EOJSON
33
[
34
{
35
"name" : "Copyright 2199 Examplecorp"
36
},
37
{
38
"name" : "Privacy Policy",
39
"href" : "http://www.example.org/privacy/"
40
},
41
{
42
"name" : "Terms and Conditions",
43
"href" : "http://www.example.org/terms/"
44
}
45
]
46
EOJSON;
47
48
$logo_type = 'custom:PhabricatorCustomLogoConfigType';
49
$footer_type = 'custom:PhabricatorCustomUIFooterConfigType';
50
51
return array(
52
$this->newOption('ui.header-color', 'enum', 'blindigo')
53
->setDescription(
54
pht('Sets the default color scheme.'))
55
->setEnumOptions($options),
56
$this->newOption('ui.logo', $logo_type, array())
57
->setSummary(
58
pht('Customize the logo and wordmark text in the header.'))
59
->setDescription(
60
pht(
61
"Customize the logo image and text which appears in the main ".
62
"site header:\n\n".
63
" - **Logo Image**: Upload a new 80 x 80px image to replace the ".
64
"logo in the site header.\n\n".
65
" - **Wordmark**: Choose new text to display next to the logo. ".
66
"By default, the header displays //%s//.\n\n",
67
PlatformSymbols::getPlatformServerName())),
68
$this->newOption('ui.favicons', 'wild', array())
69
->setSummary(pht('Customize favicons.'))
70
->setDescription(pht('Customize favicons.'))
71
->setLocked(true),
72
$this->newOption('ui.footer-items', $footer_type, array())
73
->setSummary(
74
pht(
75
'Allows you to add footer links on most pages.'))
76
->setDescription(
77
pht(
78
"Allows you to add a footer with links in it to most ".
79
"pages. You might want to use these links to point at legal ".
80
"information or an about page.\n\n".
81
"Specify a list of dictionaries. Each dictionary describes ".
82
"a footer item. These keys are supported:\n\n".
83
" - `name` The name of the item.\n".
84
" - `href` Optionally, the link target of the item. You can ".
85
" omit this if you just want a piece of text, like a copyright ".
86
" notice."))
87
->addExample($example, pht('Basic Example')),
88
);
89
}
90
91
}
92
93