Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91100962
DrydockResourceStatus.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Nov 7, 22:04
Size
821 B
Mime Type
text/x-php
Expires
Sat, Nov 9, 22:04 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22196752
Attached To
rPH Phabricator
DrydockResourceStatus.php
View Options
<?php
final
class
DrydockResourceStatus
extends
DrydockConstants
{
const
STATUS_PENDING
=
0
;
const
STATUS_OPEN
=
1
;
const
STATUS_CLOSED
=
2
;
const
STATUS_BROKEN
=
3
;
const
STATUS_DESTROYED
=
4
;
public
static
function
getNameForStatus
(
$status
)
{
$map
=
array
(
self
::
STATUS_PENDING
=>
pht
(
'Pending'
),
self
::
STATUS_OPEN
=>
pht
(
'Open'
),
self
::
STATUS_CLOSED
=>
pht
(
'Closed'
),
self
::
STATUS_BROKEN
=>
pht
(
'Broken'
),
self
::
STATUS_DESTROYED
=>
pht
(
'Destroyed'
),
);
return
idx
(
$map
,
$status
,
'Unknown'
);
}
public
static
function
getAllStatuses
()
{
return
array
(
self
::
STATUS_PENDING
,
self
::
STATUS_OPEN
,
self
::
STATUS_CLOSED
,
self
::
STATUS_BROKEN
,
self
::
STATUS_DESTROYED
,
);
}
}
Event Timeline
Log In to Comment