Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2890118
DifferentialRevisionJIRAIssueURIsHeraldField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
DifferentialRevisionJIRAIssueURIsHeraldField.php
View Options
<?php
final
class
DifferentialRevisionJIRAIssueURIsHeraldField
extends
DifferentialRevisionHeraldField
{
const
FIELDCONST
=
'differential.revision.jira.uris'
;
public
function
getHeraldFieldName
(
)
{
return
pht
(
'JIRA Issue URIs'
)
;
}
public
function
supportsObject
(
$object
)
{
$provider
=
PhabricatorJIRAAuthProvider
::
getJIRAProvider
(
)
;
if
(
!
$provider
)
{
return
false
;
}
return
parent
::
supportsObject
(
$object
)
;
}
public
function
getHeraldFieldValue
(
$object
)
{
$adapter
=
$this
->
getAdapter
(
)
;
$viewer
=
$adapter
->
getViewer
(
)
;
$jira_phids
=
PhabricatorEdgeQuery
::
loadDestinationPHIDs
(
$object
->
getPHID
(
)
,
PhabricatorJiraIssueHasObjectEdgeType
::
EDGECONST
)
;
if
(
!
$jira_phids
)
{
return
array
(
)
;
}
$xobjs
=
id
(
new
DoorkeeperExternalObjectQuery
(
)
)
->
setViewer
(
$viewer
)
->
withPHIDs
(
$jira_phids
)
->
execute
(
)
;
return
mpull
(
$xobjs
,
'getObjectURI'
)
;
}
protected
function
getHeraldFieldStandardType
(
)
{
return
self
::
STANDARD_TEXT_LIST
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 13:05 (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1124891
Default Alt Text
DifferentialRevisionJIRAIssueURIsHeraldField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment