Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92654623
DiffusionCommitRevisionAcceptedHeraldField.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 22, 10:40
Size
922 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 10:40 (2 d)
Engine
blob
Format
Raw Data
Handle
22479135
Attached To
rPH Phabricator
DiffusionCommitRevisionAcceptedHeraldField.php
View Options
<?php
final
class
DiffusionCommitRevisionAcceptedHeraldField
extends
DiffusionCommitHeraldField
{
const
FIELDCONST
=
'diffusion.commit.revision.accepted'
;
public
function
getHeraldFieldName
()
{
return
pht
(
'Accepted Differential revision'
);
}
public
function
getFieldGroupKey
()
{
return
HeraldRelatedFieldGroup
::
FIELDGROUPKEY
;
}
public
function
getHeraldFieldValue
(
$object
)
{
$revision
=
$this
->
getAdapter
()->
loadDifferentialRevision
();
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