Path: blob/master/src/applications/differential/herald/DifferentialRevisionJIRAIssueURIsHeraldField.php
12256 views
<?php12final class DifferentialRevisionJIRAIssueURIsHeraldField3extends DifferentialRevisionHeraldField {45const FIELDCONST = 'differential.revision.jira.uris';67public function getHeraldFieldName() {8return pht('JIRA Issue URIs');9}1011public function supportsObject($object) {12$provider = PhabricatorJIRAAuthProvider::getJIRAProvider();13if (!$provider) {14return false;15}1617return parent::supportsObject($object);18}1920public function getHeraldFieldValue($object) {21$adapter = $this->getAdapter();22$viewer = $adapter->getViewer();2324$jira_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(25$object->getPHID(),26PhabricatorJiraIssueHasObjectEdgeType::EDGECONST);27if (!$jira_phids) {28return array();29}3031$xobjs = id(new DoorkeeperExternalObjectQuery())32->setViewer($viewer)33->withPHIDs($jira_phids)34->execute();3536return mpull($xobjs, 'getObjectURI');37}3839protected function getHeraldFieldStandardType() {40return self::STANDARD_TEXT_LIST;41}4243}444546