2014-05-09 21:47:21 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorSMSConfigOptions
|
|
|
|
extends PhabricatorApplicationConfigOptions {
|
|
|
|
|
|
|
|
public function getName() {
|
|
|
|
return pht('SMS');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescription() {
|
|
|
|
return pht('Configure SMS.');
|
|
|
|
}
|
|
|
|
|
2015-02-02 19:17:25 +01:00
|
|
|
public function getFontIcon() {
|
|
|
|
return 'fa-mobile';
|
|
|
|
}
|
|
|
|
|
2015-02-09 22:10:56 +01:00
|
|
|
public function getGroup() {
|
|
|
|
return 'core';
|
|
|
|
}
|
|
|
|
|
2014-05-09 21:47:21 +02:00
|
|
|
public function getOptions() {
|
2015-05-22 09:27:56 +02:00
|
|
|
$adapter_description = pht(
|
|
|
|
'Adapter class to use to transmit SMS to an external provider. A given '.
|
|
|
|
'external provider will most likely need more configuration which will '.
|
|
|
|
'most likely require registration and payment for the service.');
|
2014-05-09 21:47:21 +02:00
|
|
|
|
|
|
|
return array(
|
|
|
|
$this->newOption(
|
|
|
|
'sms.default-sender',
|
|
|
|
'string',
|
|
|
|
null)
|
|
|
|
->setDescription(pht('Default "from" number.'))
|
|
|
|
->addExample('8675309', 'Jenny still has this number')
|
|
|
|
->addExample('18005555555', 'Maybe not a real number'),
|
|
|
|
$this->newOption(
|
|
|
|
'sms.default-adapter',
|
|
|
|
'class',
|
|
|
|
null)
|
|
|
|
->setBaseClass('PhabricatorSMSImplementationAdapter')
|
2015-05-22 09:27:56 +02:00
|
|
|
->setSummary(pht('Control how SMS is sent.'))
|
2014-05-09 21:47:21 +02:00
|
|
|
->setDescription($adapter_description),
|
|
|
|
$this->newOption(
|
|
|
|
'twilio.account-sid',
|
|
|
|
'string',
|
|
|
|
null)
|
|
|
|
->setDescription(pht('Account ID on Twilio service.'))
|
|
|
|
->setLocked(true)
|
|
|
|
->addExample('gf5kzccfn2sfknpnadvz7kokv6nz5v', pht('30 characters')),
|
|
|
|
$this->newOption(
|
|
|
|
'twilio.auth-token',
|
|
|
|
'string',
|
|
|
|
null)
|
|
|
|
->setDescription(pht('Authorization token from Twilio service.'))
|
|
|
|
->setHidden(true)
|
2014-10-07 15:01:04 +02:00
|
|
|
->addExample('f3jsi4i67wiwt6w54hf2zwvy3fjf5h', pht('30 characters')),
|
2014-05-09 21:47:21 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|