Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93031900
PhabricatorMacroDisabledTransaction.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, 16:52
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Nov 27, 16:52 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22558749
Attached To
rPH Phabricator
PhabricatorMacroDisabledTransaction.php
View Options
<?php
final
class
PhabricatorMacroDisabledTransaction
extends
PhabricatorMacroTransactionType
{
const
TRANSACTIONTYPE
=
'macro:disabled'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getIsDisabled
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setIsDisabled
(
$value
);
}
public
function
getTitle
()
{
if
(
$this
->
getNewValue
())
{
return
pht
(
'%s disabled this macro.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s restored this macro.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
if
(
$this
->
getNewValue
())
{
return
pht
(
'%s disabled %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s restored %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
public
function
getIcon
()
{
if
(
$this
->
getNewValue
())
{
return
'fa-ban'
;
}
else
{
return
'fa-check'
;
}
}
}
Event Timeline
Log In to Comment