mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-04 12:42:43 +01:00
35 lines
739 B
PHP
35 lines
739 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* @group ponder
|
||
|
*/
|
||
|
final class PonderQuestionStatus extends PonderConstants {
|
||
|
|
||
|
const STATUS_OPEN = 0;
|
||
|
const STATUS_CLOSED = 1;
|
||
|
|
||
|
public static function getQuestionStatusMap() {
|
||
|
return array(
|
||
|
self::STATUS_OPEN => pht('Open'),
|
||
|
self::STATUS_CLOSED => pht('Closed'),
|
||
|
);
|
||
|
}
|
||
|
|
||
|
public static function getQuestionStatusFullName($status) {
|
||
|
$map = array(
|
||
|
self::STATUS_OPEN => pht('Open'),
|
||
|
self::STATUS_CLOSED => pht('Closed by author'),
|
||
|
);
|
||
|
return idx($map, $status, '???');
|
||
|
}
|
||
|
|
||
|
public static function getQuestionStatusTagColor($status) {
|
||
|
$map = array(
|
||
|
self::STATUS_CLOSED => PhabricatorTagView::COLOR_BLACK,
|
||
|
);
|
||
|
|
||
|
return idx($map, $status);
|
||
|
}
|
||
|
|
||
|
}
|