Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79466652
PhabricatorPhamePostPHIDType.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
Mon, Aug 26, 13:30
Size
969 B
Mime Type
text/x-php
Expires
Wed, Aug 28, 13:30 (2 d)
Engine
blob
Format
Raw Data
Handle
20192265
Attached To
rPH Phabricator
PhabricatorPhamePostPHIDType.php
View Options
<?php
final
class
PhabricatorPhamePostPHIDType
extends
PhabricatorPHIDType
{
const
TYPECONST
=
'POST'
;
public
function
getTypeName
()
{
return
pht
(
'Phame Post'
);
}
public
function
newObject
()
{
return
new
PhamePost
();
}
public
function
getPHIDTypeApplicationClass
()
{
return
'PhabricatorPhameApplication'
;
}
protected
function
buildQueryForObjects
(
PhabricatorObjectQuery
$query
,
array
$phids
)
{
return
id
(
new
PhamePostQuery
())
->
withPHIDs
(
$phids
);
}
public
function
loadHandles
(
PhabricatorHandleQuery
$query
,
array
$handles
,
array
$objects
)
{
foreach
(
$handles
as
$phid
=>
$handle
)
{
$post
=
$objects
[
$phid
];
$handle
->
setName
(
$post
->
getTitle
());
$handle
->
setFullName
(
$post
->
getTitle
());
$handle
->
setURI
(
'/phame/post/view/'
.
$post
->
getID
().
'/'
);
if
(
$post
->
isArchived
())
{
$handle
->
setStatus
(
PhabricatorObjectHandle
::
STATUS_CLOSED
);
}
}
}
}
Event Timeline
Log In to Comment