Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91430631
PhabricatorProjectsAncestorsSearchEngineAttachment.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, Nov 11, 01:11
Size
704 B
Mime Type
text/x-php
Expires
Wed, Nov 13, 01:11 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22262135
Attached To
rPH Phabricator
PhabricatorProjectsAncestorsSearchEngineAttachment.php
View Options
<?php
final
class
PhabricatorProjectsAncestorsSearchEngineAttachment
extends
PhabricatorSearchEngineAttachment
{
public
function
getAttachmentName
()
{
return
pht
(
'Project Ancestors'
);
}
public
function
getAttachmentDescription
()
{
return
pht
(
'Get the full ancestor list for each project.'
);
}
public
function
getAttachmentForObject
(
$object
,
$data
,
$spec
)
{
$ancestors
=
$object
->
getAncestorProjects
();
// Order ancestors by depth, ascending.
$ancestors
=
array_reverse
(
$ancestors
);
$results
=
array
();
foreach
(
$ancestors
as
$ancestor
)
{
$results
[]
=
$ancestor
->
getRefForConduit
();
}
return
array
(
'ancestors'
=>
$results
,
);
}
}
Event Timeline
Log In to Comment