Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91152957
DiffusionPreCommitContentRevisionAcceptedHeraldField.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 8, 10:40
Size
1007 B
Mime Type
text/x-php
Expires
Sun, Nov 10, 10:40 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22206605
Attached To
rPH Phabricator
DiffusionPreCommitContentRevisionAcceptedHeraldField.php
View Options
<?php
final
class
DiffusionPreCommitContentRevisionAcceptedHeraldField
extends
DiffusionPreCommitContentHeraldField
{
const
FIELDCONST
=
'diffusion.pre.content.revision.accepted'
;
public
function
getHeraldFieldName
()
{
return
pht
(
'Accepted Differential revision'
);
}
public
function
getFieldGroupKey
()
{
return
HeraldRelatedFieldGroup
::
FIELDGROUPKEY
;
}
public
function
getHeraldFieldValue
(
$object
)
{
$revision
=
$this
->
getAdapter
()->
getRevision
();
if
(!
$revision
)
{
return
null
;
}
switch
(
$revision
->
getStatus
())
{
case
ArcanistDifferentialRevisionStatus
::
ACCEPTED
:
return
$revision
->
getPHID
();
case
ArcanistDifferentialRevisionStatus
::
CLOSED
:
if
(
$revision
->
getProperty
(
DifferentialRevision
::
PROPERTY_CLOSED_FROM_ACCEPTED
))
{
return
$revision
->
getPHID
();
}
break
;
}
return
null
;
}
protected
function
getHeraldFieldStandardType
()
{
return
self
::
STANDARD_PHID_BOOL
;
}
}
Event Timeline
Log In to Comment