@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhabricatorOwnersPathsSearchEngineAttachment
4 extends PhabricatorSearchEngineAttachment {
5
6 public function getAttachmentName() {
7 return pht('Included Paths');
8 }
9
10 public function getAttachmentDescription() {
11 return pht('Get the paths for each package.');
12 }
13
14 public function willLoadAttachmentData($query, $spec) {
15 $query->needPaths(true);
16 }
17
18 public function getAttachmentForObject($object, $data, $spec) {
19 $paths = $object->getPaths();
20
21 $list = array();
22 foreach ($paths as $path) {
23 $list[] = array(
24 'repositoryPHID' => $path->getRepositoryPHID(),
25 'path' => $path->getPathDisplay(),
26 'excluded' => (bool)$path->getExcluded(),
27 );
28 }
29
30 return array(
31 'paths' => $list,
32 );
33 }
34
35}