Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94125256
PhameConstants.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
Wed, Dec 4, 02:53
Size
676 B
Mime Type
text/x-php
Expires
Fri, Dec 6, 02:53 (1 d, 11 h)
Engine
blob
Format
Raw Data
Handle
22670422
Attached To
rPH Phabricator
PhameConstants.php
View Options
<?php
final
class
PhameConstants
extends
Phobject
{
const
VISIBILITY_DRAFT
=
0
;
const
VISIBILITY_PUBLISHED
=
1
;
const
VISIBILITY_ARCHIVED
=
2
;
public
static
function
getPhamePostStatusMap
()
{
return
array
(
self
::
VISIBILITY_PUBLISHED
=>
pht
(
'Published'
),
self
::
VISIBILITY_DRAFT
=>
pht
(
'Draft'
),
self
::
VISIBILITY_ARCHIVED
=>
pht
(
'Archived'
),
);
}
public
static
function
getPhamePostStatusName
(
$status
)
{
$map
=
array
(
self
::
VISIBILITY_PUBLISHED
=>
pht
(
'Published'
),
self
::
VISIBILITY_DRAFT
=>
pht
(
'Draft'
),
self
::
VISIBILITY_ARCHIVED
=>
pht
(
'Archived'
),
);
return
idx
(
$map
,
$status
,
pht
(
'Unknown'
));
}
}
Event Timeline
Log In to Comment