Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101484556
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
Mon, Feb 10, 22:04
Size
670 B
Mime Type
text/x-php
Expires
Wed, Feb 12, 22:04 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24161983
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