Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98158212
DifferentialProjectReviewersFieldSpecification.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, Jan 10, 10:17
Size
963 B
Mime Type
text/x-php
Expires
Sun, Jan 12, 10:17 (2 d)
Engine
blob
Format
Raw Data
Handle
23520464
Attached To
rPH Phabricator
DifferentialProjectReviewersFieldSpecification.php
View Options
<?php
final
class
DifferentialProjectReviewersFieldSpecification
extends
DifferentialFieldSpecification
{
public
function
shouldAppearOnRevisionView
()
{
return
true
;
}
public
function
getRequiredHandlePHIDsForRevisionView
()
{
return
$this
->
getRevision
()->
getReviewers
();
}
public
function
renderLabelForRevisionView
()
{
return
pht
(
'Project Reviewers'
);
}
public
function
renderValueForRevisionView
()
{
$reviewers
=
array
();
foreach
(
$this
->
getRevision
()->
getReviewerStatus
()
as
$reviewer
)
{
if
(!
$reviewer
->
isUser
())
{
$reviewers
[]
=
$reviewer
;
}
}
if
(!
$reviewers
)
{
return
null
;
}
$view
=
id
(
new
DifferentialReviewersView
())
->
setUser
(
$this
->
getUser
())
->
setReviewers
(
$reviewers
)
->
setHandles
(
$this
->
getLoadedHandles
());
$diff
=
$this
->
getRevision
()->
loadActiveDiff
();
if
(
$diff
)
{
$view
->
setActiveDiff
(
$diff
);
}
return
$view
;
}
}
Event Timeline
Log In to Comment