Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92115820
DifferentialDependenciesFieldSpecification.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, Nov 17, 12:15
Size
950 B
Mime Type
text/x-php
Expires
Tue, Nov 19, 12:15 (2 d)
Engine
blob
Format
Raw Data
Handle
22378120
Attached To
rPH Phabricator
DifferentialDependenciesFieldSpecification.php
View Options
<?php
final
class
DifferentialDependenciesFieldSpecification
extends
DifferentialFieldSpecification
{
public
function
shouldAppearOnRevisionView
()
{
return
true
;
}
public
function
getRequiredHandlePHIDsForRevisionView
()
{
return
$this
->
getDependentRevisionPHIDs
();
}
public
function
renderLabelForRevisionView
()
{
return
'Dependents:'
;
}
public
function
renderValueForRevisionView
()
{
$revision_phids
=
$this
->
getDependentRevisionPHIDs
();
if
(!
$revision_phids
)
{
return
null
;
}
$links
=
array
();
foreach
(
$revision_phids
as
$revision_phids
)
{
$links
[]
=
$this
->
getHandle
(
$revision_phids
)->
renderLink
();
}
return
phutil_implode_html
(
phutil_tag
(
'br'
),
$links
);
}
private
function
getDependentRevisionPHIDs
()
{
return
PhabricatorEdgeQuery
::
loadDestinationPHIDs
(
$this
->
getRevision
()->
getPHID
(),
PhabricatorEdgeConfig
::
TYPE_DREV_DEPENDED_ON_BY_DREV
);
}
}
Event Timeline
Log In to Comment