Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97611899
DifferentialDependsOnFieldSpecification.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, Jan 5, 17:20
Size
943 B
Mime Type
text/x-php
Expires
Tue, Jan 7, 17:20 (2 d)
Engine
blob
Format
Raw Data
Handle
23364960
Attached To
rPH Phabricator
DifferentialDependsOnFieldSpecification.php
View Options
<?php
final
class
DifferentialDependsOnFieldSpecification
extends
DifferentialFieldSpecification
{
public
function
shouldAppearOnRevisionView
()
{
return
true
;
}
public
function
getRequiredHandlePHIDsForRevisionView
()
{
return
$this
->
getDependentRevisionPHIDs
();
}
public
function
renderLabelForRevisionView
()
{
return
'Depends On:'
;
}
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_DEPENDS_ON_DREV
);
}
}
Event Timeline
Log In to Comment