Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93154948
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
Tue, Nov 26, 15:21
Size
826 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 15:21 (2 d)
Engine
blob
Format
Raw Data
Handle
22504897
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