3 final class PonderQuestionStatus
extends PonderConstants
{
5 const STATUS_OPEN
= 'open';
6 const STATUS_CLOSED_RESOLVED
= 'resolved';
7 const STATUS_CLOSED_OBSOLETE
= 'obsolete';
8 const STATUS_CLOSED_INVALID
= 'invalid';
10 public static function getQuestionStatusMap() {
12 self
::STATUS_OPEN
=> pht('Open'),
13 self
::STATUS_CLOSED_RESOLVED
=> pht('Closed, Resolved'),
14 self
::STATUS_CLOSED_OBSOLETE
=> pht('Closed, Obsolete'),
15 self
::STATUS_CLOSED_INVALID
=> pht('Closed, Invalid'),
19 public static function getQuestionStatusFullName($status) {
21 self
::STATUS_OPEN
=> pht('Open'),
22 self
::STATUS_CLOSED_RESOLVED
=> pht('Closed, Resolved'),
23 self
::STATUS_CLOSED_OBSOLETE
=> pht('Closed, Obsolete'),
24 self
::STATUS_CLOSED_INVALID
=> pht('Closed, Invalid'),
26 return idx($map, $status, pht('Unknown'));
29 public static function getQuestionStatusName($status) {
31 self
::STATUS_OPEN
=> pht('Open'),
32 self
::STATUS_CLOSED_RESOLVED
=> pht('Resolved'),
33 self
::STATUS_CLOSED_OBSOLETE
=> pht('Obsolete'),
34 self
::STATUS_CLOSED_INVALID
=> pht('Invalid'),
36 return idx($map, $status, pht('Unknown'));
39 public static function getQuestionStatusDescription($status) {
42 pht('This question is open for answers.'),
43 self
::STATUS_CLOSED_RESOLVED
=>
44 pht('This question has been answered or resolved.'),
45 self
::STATUS_CLOSED_OBSOLETE
=>
46 pht('This question is out of date.'),
47 self
::STATUS_CLOSED_INVALID
=>
48 pht('This question is invalid.'),
50 return idx($map, $status, pht('Unknown'));
53 public static function getQuestionStatusTagColor($status) {
55 self
::STATUS_OPEN
=> PHUITagView
::COLOR_BLUE
,
56 self
::STATUS_CLOSED_RESOLVED
=> PHUITagView
::COLOR_BLACK
,
57 self
::STATUS_CLOSED_OBSOLETE
=> PHUITagView
::COLOR_BLACK
,
58 self
::STATUS_CLOSED_INVALID
=> PHUITagView
::COLOR_BLACK
,
61 return idx($map, $status);
64 public static function getQuestionStatusIcon($status) {
66 self
::STATUS_OPEN
=> 'fa-question-circle',
67 self
::STATUS_CLOSED_RESOLVED
=> 'fa-check',
68 self
::STATUS_CLOSED_OBSOLETE
=> 'fa-ban',
69 self
::STATUS_CLOSED_INVALID
=> 'fa-ban',
72 return idx($map, $status);
75 public static function getQuestionStatusOpenMap() {
81 public static function getQuestionStatusClosedMap() {
83 self
::STATUS_CLOSED_RESOLVED
,
84 self
::STATUS_CLOSED_OBSOLETE
,
85 self
::STATUS_CLOSED_INVALID
,