Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93054236
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
Mon, Nov 25, 20:46
Size
934 B
Mime Type
text/x-php
Expires
Wed, Nov 27, 20:46 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
22563824
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
;
}
if
(
$revision
->
isAccepted
())
{
return
$revision
->
getPHID
();
}
$was_accepted
=
DifferentialRevision
::
PROPERTY_CLOSED_FROM_ACCEPTED
;
if
(
$revision
->
isPublished
())
{
if
(
$revision
->
getProperty
(
$was_accepted
))
{
return
$revision
->
getPHID
();
}
}
return
null
;
}
protected
function
getHeraldFieldStandardType
()
{
return
self
::
STANDARD_PHID_BOOL
;
}
}
Event Timeline
Log In to Comment