2013-01-03 18:29:19 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorNotificationConfigOptions
|
|
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
|
|
|
|
public function getName() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Notifications');
|
2013-01-03 18:29:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescription() {
|
2014-06-09 20:36:49 +02:00
|
|
|
return pht('Configure real-time notifications.');
|
2013-01-03 18:29:19 +01:00
|
|
|
}
|
|
|
|
|
2016-01-28 17:40:22 +01:00
|
|
|
public function getIcon() {
|
2015-02-02 19:17:25 +01:00
|
|
|
return 'fa-bell';
|
|
|
|
}
|
|
|
|
|
2015-02-09 22:10:56 +01:00
|
|
|
public function getGroup() {
|
|
|
|
return 'core';
|
|
|
|
}
|
|
|
|
|
2013-01-03 18:29:19 +01:00
|
|
|
public function getOptions() {
|
2017-06-27 18:50:57 +02:00
|
|
|
$servers_type = 'cluster.notifications';
|
2016-04-13 21:07:48 +02:00
|
|
|
$servers_help = $this->deformat(pht(<<<EOTEXT
|
|
|
|
Provide a list of notification servers to enable real-time notifications.
|
|
|
|
|
|
|
|
For help setting up notification servers, see **[[ %s | %s ]]** in the
|
|
|
|
documentation.
|
|
|
|
EOTEXT
|
|
|
|
,
|
|
|
|
PhabricatorEnv::getDoclink(
|
|
|
|
'Notifications User Guide: Setup and Configuration'),
|
|
|
|
pht('Notifications User Guide: Setup and Configuration')));
|
|
|
|
|
|
|
|
$servers_example1 = array(
|
|
|
|
array(
|
|
|
|
'type' => 'client',
|
|
|
|
'host' => 'phabricator.mycompany.com',
|
|
|
|
'port' => 22280,
|
|
|
|
'protocol' => 'https',
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'type' => 'admin',
|
|
|
|
'host' => '127.0.0.1',
|
|
|
|
'port' => 22281,
|
|
|
|
'protocol' => 'http',
|
|
|
|
),
|
|
|
|
);
|
|
|
|
|
|
|
|
$servers_example1 = id(new PhutilJSON())->encodeAsList(
|
|
|
|
$servers_example1);
|
|
|
|
|
2013-01-03 18:29:19 +01:00
|
|
|
return array(
|
2016-04-13 21:07:48 +02:00
|
|
|
$this->newOption('notification.servers', $servers_type, array())
|
|
|
|
->setSummary(pht('Configure real-time notifications.'))
|
|
|
|
->setDescription($servers_help)
|
|
|
|
->addExample(
|
|
|
|
$servers_example1,
|
|
|
|
pht('Simple Example')),
|
2013-01-03 18:29:19 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|