3 final class PhabricatorMailOutboundStatus
6 const STATUS_QUEUE
= 'queued';
7 const STATUS_SENT
= 'sent';
8 const STATUS_FAIL
= 'fail';
9 const STATUS_VOID
= 'void';
12 public static function getStatusName($status_code) {
14 self
::STATUS_QUEUE
=> pht('Queued'),
15 self
::STATUS_FAIL
=> pht('Delivery Failed'),
16 self
::STATUS_SENT
=> pht('Sent'),
17 self
::STATUS_VOID
=> pht('Voided'),
19 $status_code = coalesce($status_code, '?');
20 return idx($names, $status_code, $status_code);
23 public static function getStatusIcon($status_code) {
25 self
::STATUS_QUEUE
=> 'fa-clock-o',
26 self
::STATUS_FAIL
=> 'fa-warning',
27 self
::STATUS_SENT
=> 'fa-envelope',
28 self
::STATUS_VOID
=> 'fa-trash',
30 return idx($icons, $status_code, 'fa-question-circle');
33 public static function getStatusColor($status_code) {
35 self
::STATUS_QUEUE
=> 'blue',
36 self
::STATUS_FAIL
=> 'red',
37 self
::STATUS_SENT
=> 'green',
38 self
::STATUS_VOID
=> 'black',
41 return idx($colors, $status_code, 'yellow');