Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/owners/engineextension/PhabricatorOwnersPathsSearchEngineAttachment.php
12256 views
1
<?php
2
3
final 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
}
36
37