Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F869778
PhabricatorBadgesBadgeStatusTransaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorBadgesBadgeStatusTransaction.php
View Options
<?php
final
class
PhabricatorBadgesBadgeStatusTransaction
extends
PhabricatorBadgesBadgeTransactionType
{
const
TRANSACTIONTYPE
=
'badges.status'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getStatus
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setStatus
(
$value
);
}
public
function
getTitle
()
{
if
(
$this
->
getNewValue
()
==
PhabricatorBadgesBadge
::
STATUS_ARCHIVED
)
{
return
pht
(
'%s disabled this badge.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s enabled this badge.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
if
(
$this
->
getNewValue
()
==
PhabricatorBadgesBadge
::
STATUS_ARCHIVED
)
{
return
pht
(
'%s disabled the badge %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s enabled the badge %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
public
function
getIcon
()
{
if
(
$this
->
getNewValue
()
==
PhabricatorBadgesBadge
::
STATUS_ARCHIVED
)
{
return
'fa-ban'
;
}
else
{
return
'fa-check'
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, May 30, 7:51 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
183910
Default Alt Text
PhabricatorBadgesBadgeStatusTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment