Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94014945
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
Tue, Dec 3, 06:37
Size
676 B
Mime Type
text/x-php
Expires
Thu, Dec 5, 06:37 (1 d, 23 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