Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F549881
PhabricatorBadgesBadgeIconTransaction.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
PhabricatorBadgesBadgeIconTransaction.php
View Options
<?php
final
class
PhabricatorBadgesBadgeIconTransaction
extends
PhabricatorBadgesBadgeTransactionType
{
const
TRANSACTIONTYPE
=
'badge.icon'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getIcon
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setIcon
(
$value
);
}
public
function
shouldHide
()
{
if
(
$this
->
isCreateTransaction
())
{
return
true
;
}
return
false
;
}
public
function
getTitle
()
{
$old
=
$this
->
getIconLabel
(
$this
->
getOldValue
());
$new
=
$this
->
getIconLabel
(
$this
->
getNewValue
());
return
pht
(
'%s changed the badge icon from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderValue
(
$old
),
$this
->
renderValue
(
$new
));
}
public
function
getTitleForFeed
()
{
$old
=
$this
->
getIconLabel
(
$this
->
getOldValue
());
$new
=
$this
->
getIconLabel
(
$this
->
getNewValue
());
return
pht
(
'%s changed the badge icon for %s from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
(),
$this
->
renderValue
(
$old
),
$this
->
renderValue
(
$new
));
}
private
function
getIconLabel
(
$icon
)
{
$set
=
new
PhabricatorBadgesIconSet
();
return
$set
->
getIconLabel
(
$icon
);
}
public
function
getIcon
()
{
return
$this
->
getNewValue
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 2:22 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
122186
Default Alt Text
PhabricatorBadgesBadgeIconTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment