Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98270135
DifferentialAuditorsFieldSpecification.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
Sat, Jan 11, 15:46
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jan 13, 15:46 (2 d)
Engine
blob
Format
Raw Data
Handle
23547029
Attached To
rPH Phabricator
DifferentialAuditorsFieldSpecification.php
View Options
<?php
final
class
DifferentialAuditorsFieldSpecification
extends
DifferentialFieldSpecification
{
private
$auditors
=
array
();
public
function
shouldAppearOnCommitMessage
()
{
return
true
;
}
public
function
shouldAppearOnCommitMessageTemplate
()
{
return
false
;
}
public
function
getCommitMessageKey
()
{
return
'auditorPHIDs'
;
}
public
function
setValueFromParsedCommitMessage
(
$value
)
{
$this
->
auditors
=
nonempty
(
$value
,
array
());
return
$this
;
}
public
function
renderLabelForCommitMessage
()
{
return
'Auditors'
;
}
public
function
getRequiredHandlePHIDsForCommitMessage
()
{
return
$this
->
auditors
;
}
public
function
renderValueForCommitMessage
(
$is_edit
)
{
if
(!
$this
->
auditors
)
{
return
null
;
}
$names
=
array
();
foreach
(
$this
->
auditors
as
$phid
)
{
$names
[]
=
$this
->
getHandle
(
$phid
)->
getName
();
}
return
implode
(
', '
,
$names
);
}
public
function
parseValueFromCommitMessage
(
$value
)
{
return
$this
->
parseCommitMessageUserList
(
$value
);
}
public
function
getStorageKey
()
{
return
'phabricator:auditors'
;
}
public
function
getValueForStorage
()
{
return
json_encode
(
$this
->
auditors
);
}
public
function
setValueFromStorage
(
$value
)
{
$auditors
=
json_decode
(
$value
,
true
);
if
(!
is_array
(
$auditors
))
{
$auditors
=
array
();
}
$this
->
auditors
=
$auditors
;
return
$this
;
}
}
Event Timeline
Log In to Comment