Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F72530109
PonderAnswerPHIDType.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, Jul 15, 13:47
Size
944 B
Mime Type
text/x-php
Expires
Wed, Jul 17, 13:47 (2 d)
Engine
blob
Format
Raw Data
Handle
19061162
Attached To
rPH Phabricator
PonderAnswerPHIDType.php
View Options
<?php
final
class
PonderAnswerPHIDType
extends
PhabricatorPHIDType
{
const
TYPECONST
=
'ANSW'
;
public
function
getTypeName
()
{
return
pht
(
'Ponder Answer'
);
}
public
function
getPHIDTypeApplicationClass
()
{
return
'PhabricatorPonderApplication'
;
}
public
function
newObject
()
{
return
new
PonderAnswer
();
}
protected
function
buildQueryForObjects
(
PhabricatorObjectQuery
$query
,
array
$phids
)
{
return
id
(
new
PonderAnswerQuery
())
->
withPHIDs
(
$phids
);
}
public
function
loadHandles
(
PhabricatorHandleQuery
$query
,
array
$handles
,
array
$objects
)
{
foreach
(
$handles
as
$phid
=>
$handle
)
{
$answer
=
$objects
[
$phid
];
$id
=
$answer
->
getID
();
$question
=
$answer
->
getQuestion
();
$question_title
=
$question
->
getFullTitle
();
$handle
->
setName
(
pht
(
'%s (Answer %s)'
,
$question_title
,
$id
));
$handle
->
setURI
(
$answer
->
getURI
());
}
}
}
Event Timeline
Log In to Comment