2013-07-28 03:37:17 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
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'),
|
|
|
|
);
|
2015-05-22 09:27:56 +02:00
|
|
|
return idx($map, $status, pht('Unknown'));
|
2013-07-28 03:37:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public static function getQuestionStatusTagColor($status) {
|
|
|
|
$map = array(
|
2015-05-29 00:17:34 +02:00
|
|
|
self::STATUS_OPEN => PHUITagView::COLOR_BLUE,
|
2014-01-14 23:09:52 +01:00
|
|
|
self::STATUS_CLOSED => PHUITagView::COLOR_BLACK,
|
2013-07-28 03:37:17 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
return idx($map, $status);
|
|
|
|
}
|
|
|
|
|
2015-05-29 00:17:34 +02:00
|
|
|
public static function getQuestionStatusIcon($status) {
|
|
|
|
$map = array(
|
|
|
|
self::STATUS_OPEN => 'fa-question-circle',
|
|
|
|
self::STATUS_CLOSED => 'fa-check-square-o',
|
|
|
|
);
|
|
|
|
|
|
|
|
return idx($map, $status);
|
|
|
|
}
|
|
|
|
|
2013-07-28 03:37:17 +02:00
|
|
|
}
|