Remove product literal strings in "pht()", part 6
[phabricator.git] / src / applications / differential / herald / DifferentialRevisionJIRAIssueURIsHeraldField.php
blob83b3cec39e8d16ddd3947e25953c7ad54127b57d
1 <?php
3 final class DifferentialRevisionJIRAIssueURIsHeraldField
4 extends DifferentialRevisionHeraldField {
6 const FIELDCONST = 'differential.revision.jira.uris';
8 public function getHeraldFieldName() {
9 return pht('JIRA Issue URIs');
12 public function supportsObject($object) {
13 $provider = PhabricatorJIRAAuthProvider::getJIRAProvider();
14 if (!$provider) {
15 return false;
18 return parent::supportsObject($object);
21 public function getHeraldFieldValue($object) {
22 $adapter = $this->getAdapter();
23 $viewer = $adapter->getViewer();
25 $jira_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
26 $object->getPHID(),
27 PhabricatorJiraIssueHasObjectEdgeType::EDGECONST);
28 if (!$jira_phids) {
29 return array();
32 $xobjs = id(new DoorkeeperExternalObjectQuery())
33 ->setViewer($viewer)
34 ->withPHIDs($jira_phids)
35 ->execute();
37 return mpull($xobjs, 'getObjectURI');
40 protected function getHeraldFieldStandardType() {
41 return self::STANDARD_TEXT_LIST;