Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92970262
DifferentialRevisionHoldDraftTransaction.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, 06:17
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Nov 27, 06:17 (2 d)
Engine
blob
Format
Raw Data
Handle
22548553
Attached To
rPH Phabricator
DifferentialRevisionHoldDraftTransaction.php
View Options
<?php
final
class
DifferentialRevisionHoldDraftTransaction
extends
DifferentialRevisionTransactionType
{
const
TRANSACTIONTYPE
=
'draft'
;
const
EDITKEY
=
'draft'
;
public
function
generateOldValue
(
$object
)
{
return
(
bool
)
$object
->
getHoldAsDraft
();
}
public
function
generateNewValue
(
$object
,
$value
)
{
return
(
bool
)
$value
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setHoldAsDraft
(
$value
);
}
public
function
getTitle
()
{
if
(
$this
->
getNewValue
())
{
return
pht
(
'%s held this revision as a draft.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s set this revision to automatically submit once builds complete.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
if
(
$this
->
getNewValue
())
{
return
pht
(
'%s held %s as a draft.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s set %s to automatically submit once builds complete.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
}
Event Timeline
Log In to Comment