Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93448304
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 28, 20:28
Size
826 B
Mime Type
text/x-php
Expires
Sat, Nov 30, 20:28 (2 d)
Engine
blob
Format
Raw Data
Handle
22640609
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
,
pht
(
'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