3 final class PhabricatorProjectsAncestorsSearchEngineAttachment
4 extends PhabricatorSearchEngineAttachment
{
6 public function getAttachmentName() {
7 return pht('Project Ancestors');
10 public function getAttachmentDescription() {
11 return pht('Get the full ancestor list for each project.');
14 public function getAttachmentForObject($object, $data, $spec) {
15 $ancestors = $object->getAncestorProjects();
17 // Order ancestors by depth, ascending.
18 $ancestors = array_reverse($ancestors);
21 foreach ($ancestors as $ancestor) {
22 $results[] = $ancestor->getRefForConduit();
26 'ancestors' => $results,