Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92653999
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
Fri, Nov 22, 10:29
Size
940 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 10:29 (2 d)
Engine
blob
Format
Raw Data
Handle
22478348
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
array_interleave
(
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