Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / diffusion / herald / DiffusionPreCommitContentPackageOwnerHeraldField.php
blob564ef36827cdb8bde09a25ca959502bbd3dab3c3
1 <?php
3 final class DiffusionPreCommitContentPackageOwnerHeraldField
4 extends DiffusionPreCommitContentHeraldField {
6 const FIELDCONST = 'diffusion.pre.content.package.owners';
8 public function getHeraldFieldName() {
9 return pht('Affected package owners');
12 public function getFieldGroupKey() {
13 return HeraldRelatedFieldGroup::FIELDGROUPKEY;
16 public function getHeraldFieldValue($object) {
17 $packages = $this->getAdapter()->loadAffectedPackages();
18 if (!$packages) {
19 return array();
22 $owners = PhabricatorOwnersOwner::loadAllForPackages($packages);
23 return mpull($owners, 'getUserPHID');
26 protected function getHeraldFieldStandardType() {
27 return self::STANDARD_PHID_LIST;
30 protected function getDatasource() {
31 return new PhabricatorProjectOrUserDatasource();