Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103133033
DifferentialReviewedByCommitMessageField.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
Thu, Feb 27, 13:16
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Mar 1, 13:16 (2 d)
Engine
blob
Format
Raw Data
Handle
24501409
Attached To
rPH Phabricator
DifferentialReviewedByCommitMessageField.php
View Options
<?php
final
class
DifferentialReviewedByCommitMessageField
extends
DifferentialCommitMessageField
{
const
FIELDKEY
=
'reviewedByPHIDs'
;
public
function
getFieldName
()
{
return
pht
(
'Reviewed By'
);
}
public
function
getFieldOrder
()
{
return
5000
;
}
public
function
parseFieldValue
(
$value
)
{
return
$this
->
parseObjectList
(
$value
,
array
(
PhabricatorPeopleUserPHIDType
::
TYPECONST
,
PhabricatorProjectProjectPHIDType
::
TYPECONST
,
),
$allow_partial
=
true
);
}
public
function
isFieldEditable
()
{
return
false
;
}
public
function
isTemplateField
()
{
return
false
;
}
public
function
readFieldValueFromObject
(
DifferentialRevision
$revision
)
{
if
(!
$revision
->
getPHID
())
{
return
array
();
}
$phids
=
array
();
foreach
(
$revision
->
getReviewers
()
as
$reviewer
)
{
switch
(
$reviewer
->
getReviewerStatus
())
{
case
DifferentialReviewerStatus
::
STATUS_ACCEPTED
:
$phids
[]
=
$reviewer
->
getReviewerPHID
();
break
;
}
}
return
$phids
;
}
public
function
readFieldValueFromConduit
(
$value
)
{
return
$this
->
readStringListFieldValueFromConduit
(
$value
);
}
public
function
renderFieldValue
(
$value
)
{
return
$this
->
renderHandleList
(
$value
);
}
}
Event Timeline
Log In to Comment