Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F117754288
ReleephDependsOnFieldSpecification.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jun 15, 18:48
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jun 17, 18:48 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26789101
Attached To
rPH Phabricator
ReleephDependsOnFieldSpecification.php
View Options
<?php
final
class
ReleephDependsOnFieldSpecification
extends
ReleephFieldSpecification
{
public
function
getFieldKey
()
{
return
'dependsOn'
;
}
public
function
getName
()
{
return
pht
(
'Depends On'
);
}
public
function
renderValueForHeaderView
()
{
$revision_phids
=
$this
->
getDependentRevisionPHIDs
();
if
(!
$revision_phids
)
{
return
null
;
}
$links
=
array
();
$handles
=
id
(
new
PhabricatorHandleQuery
())
->
setViewer
(
$this
->
getUser
())
->
withPHIDs
(
$revision_phids
)
->
execute
();
foreach
(
$revision_phids
as
$revision_phid
)
{
$links
[]
=
id
(
clone
$handles
[
$revision_phid
])
// Hack to remove the strike-through rendering of diff links
->
setStatus
(
null
)
->
renderLink
();
}
return
phutil_implode_html
(
phutil_tag
(
'br'
),
$links
);
}
private
function
getDependentRevisionPHIDs
()
{
$revision
=
$this
->
getReleephRequest
()
->
loadDifferentialRevision
();
if
(!
$revision
)
{
return
null
;
}
return
PhabricatorEdgeQuery
::
loadDestinationPHIDs
(
$revision
->
getPHID
(),
PhabricatorEdgeConfig
::
TYPE_DREV_DEPENDS_ON_DREV
);
}
}
Event Timeline
Log In to Comment