Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90656970
PhabricatorBadgesBadgeStatusTransaction.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, Nov 3, 15:30
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Nov 5, 15:30 (2 d)
Engine
blob
Format
Raw Data
Handle
22115561
Attached To
rPH Phabricator
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'
;
}
}
}
Event Timeline
Log In to Comment