Something went wrong. Try again.
@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
Something went wrong. Try again.
799 B · 34 lines
PHP
1234567891011121314151617181920212223242526272829303132333435<?php
final class DiffusionRepositoryURIsSearchEngineAttachment extends PhabricatorSearchEngineAttachment {
public function getAttachmentName() { return pht('Repository URIs'); }
public function getAttachmentDescription() { return pht('Get a list of associated URIs for each repository.'); }
public function willLoadAttachmentData($query, $spec) { $query->needURIs(true); }
public function getAttachmentForObject($object, $data, $spec) { $uris = array(); foreach ($object->getURIs() as $uri) { $uris[] = array( 'id' => $uri->getID(), 'type' => phid_get_type($uri->getPHID()), 'phid' => $uri->getPHID(), 'fields' => $uri->getFieldValuesForConduit(), ); }
return array( 'uris' => $uris, ); }
}