Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F67703778
HeraldRuleDisableTransaction.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
Sun, Jun 23, 21:40
Size
670 B
Mime Type
text/x-php
Expires
Tue, Jun 25, 21:40 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18348689
Attached To
rPH Phabricator
HeraldRuleDisableTransaction.php
View Options
<?php
final
class
HeraldRuleDisableTransaction
extends
HeraldRuleTransactionType
{
const
TRANSACTIONTYPE
=
'herald:disable'
;
public
function
generateOldValue
(
$object
)
{
return
(
bool
)
$object
->
getIsDisabled
();
}
public
function
generateNewValue
(
$object
,
$value
)
{
return
(
bool
)
$value
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setIsDisabled
((
int
)
$value
);
}
public
function
getTitle
()
{
if
(
$this
->
getNewValue
())
{
return
pht
(
'%s disabled this rule.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s enabled this rule.'
,
$this
->
renderAuthor
());
}
}
}
Event Timeline
Log In to Comment