Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93184817
DifferentialReviewedByFieldSpecification.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
Tue, Nov 26, 20:40
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Nov 28, 20:40 (2 d)
Engine
blob
Format
Raw Data
Handle
22588518
Attached To
rPH Phabricator
DifferentialReviewedByFieldSpecification.php
View Options
<?php
final
class
DifferentialReviewedByFieldSpecification
extends
DifferentialFieldSpecification
{
private
$reviewedBy
;
protected
function
didSetRevision
()
{
$this
->
reviewedBy
=
array
();
$revision
=
$this
->
getRevision
();
$reviewer
=
$revision
->
loadReviewedBy
();
if
(
$reviewer
)
{
$this
->
reviewedBy
=
array
(
$reviewer
);
}
}
public
function
shouldAppearOnCommitMessage
()
{
return
true
;
}
public
function
getCommitMessageKey
()
{
return
'reviewedByPHIDs'
;
}
public
function
setValueFromParsedCommitMessage
(
$value
)
{
$this
->
reviewedBy
=
$value
;
return
$this
;
}
public
function
shouldAppearOnCommitMessageTemplate
()
{
return
false
;
}
public
function
renderLabelForCommitMessage
()
{
return
'Reviewed By'
;
}
public
function
getRequiredHandlePHIDsForCommitMessage
()
{
return
$this
->
reviewedBy
;
}
public
function
renderValueForCommitMessage
(
$is_edit
)
{
if
(
$is_edit
)
{
return
null
;
}
if
(!
$this
->
reviewedBy
)
{
return
null
;
}
$names
=
array
();
foreach
(
$this
->
reviewedBy
as
$phid
)
{
$names
[]
=
$this
->
getHandle
(
$phid
)->
getName
();
}
return
implode
(
', '
,
$names
);
}
public
function
parseValueFromCommitMessage
(
$value
)
{
return
$this
->
parseCommitMessageUserList
(
$value
);
}
}
Event Timeline
Log In to Comment