3 final class DiffusionCommitAuthorPackagesHeraldField
4 extends DiffusionCommitHeraldField
{
6 const FIELDCONST
= 'diffusion.commit.author.packages';
8 public function getHeraldFieldName() {
9 return pht("Author's packages");
12 public function getHeraldFieldValue($object) {
13 $adapter = $this->getAdapter();
14 $viewer = $adapter->getViewer();
16 $author_phid = $adapter->getAuthorPHID();
21 $packages = id(new PhabricatorOwnersPackageQuery())
23 ->withAuthorityPHIDs(array($author_phid))
26 return mpull($packages, 'getPHID');
29 protected function getHeraldFieldStandardType() {
30 return self
::STANDARD_PHID_LIST
;
33 protected function getDatasource() {
34 return new PhabricatorOwnersPackageDatasource();