Add methods to retrieve incident status history and available statuses

This commit is contained in:
2011-12-20 00:42:13 +00:00
parent 9f52bf701c
commit 278590ae25
3 changed files with 22 additions and 0 deletions

View File

@@ -23,6 +23,16 @@ class StatusBoard_Status {
self::STATUS_Significant => 'The service is exeriencing significant issues affecting many customers.',
self::STATUS_Major => 'The service is exeriencing a major outage affecting all customers.',
);
public function available() {
return array(
self::STATUS_Resolved,
self::STATUS_Maintenance,
self::STATUS_Minor,
self::STATUS_Significant,
self::STATUS_Major,
);
}
public static function name($status) {
if ( ! StatusBoard_Main::isClassConstantValue(get_called_class(), 'STATUS_', $status)) {