Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/config/option/PhabricatorNotificationConfigOptions.php
12256 views
1
<?php
2
3
final class PhabricatorNotificationConfigOptions
4
extends PhabricatorApplicationConfigOptions {
5
6
public function getName() {
7
return pht('Notifications');
8
}
9
10
public function getDescription() {
11
return pht('Configure real-time notifications.');
12
}
13
14
public function getIcon() {
15
return 'fa-bell';
16
}
17
18
public function getGroup() {
19
return 'core';
20
}
21
22
public function getOptions() {
23
$servers_type = 'cluster.notifications';
24
$servers_help = $this->deformat(pht(<<<EOTEXT
25
Provide a list of notification servers to enable real-time notifications.
26
27
For help setting up notification servers, see **[[ %s | %s ]]** in the
28
documentation.
29
EOTEXT
30
,
31
PhabricatorEnv::getDoclink(
32
'Notifications User Guide: Setup and Configuration'),
33
pht('Notifications User Guide: Setup and Configuration')));
34
35
$servers_example1 = array(
36
array(
37
'type' => 'client',
38
'host' => 'phabricator.mycompany.com',
39
'port' => 22280,
40
'protocol' => 'https',
41
),
42
array(
43
'type' => 'admin',
44
'host' => '127.0.0.1',
45
'port' => 22281,
46
'protocol' => 'http',
47
),
48
);
49
50
$servers_example1 = id(new PhutilJSON())->encodeAsList(
51
$servers_example1);
52
53
return array(
54
$this->newOption('notification.servers', $servers_type, array())
55
->setHidden(true)
56
->setSummary(pht('Configure real-time notifications.'))
57
->setDescription($servers_help)
58
->addExample(
59
$servers_example1,
60
pht('Simple Example')),
61
);
62
}
63
64
}
65
66