Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F555744
PhabricatorSlowvoteStatusTransaction.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
PhabricatorSlowvoteStatusTransaction.php
View Options
<?php
final
class
PhabricatorSlowvoteStatusTransaction
extends
PhabricatorSlowvoteTransactionType
{
const
TRANSACTIONTYPE
=
'vote:status'
;
public
function
generateOldValue
(
$object
)
{
return
(
string
)
$object
->
getStatus
();
}
public
function
generateNewValue
(
$object
,
$value
)
{
return
(
string
)
$value
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setStatus
(
$value
);
}
public
function
getTitle
()
{
$old_name
=
$this
->
getOldStatusObject
()->
getName
();
$new_name
=
$this
->
getNewStatusObject
()->
getName
();
return
pht
(
'%s changed the status of this poll from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderValue
(
$old_name
),
$this
->
renderValue
(
$new_name
));
}
public
function
getTitleForFeed
()
{
$old_name
=
$this
->
getOldStatusObject
()->
getName
();
$new_name
=
$this
->
getNewStatusObject
()->
getName
();
return
pht
(
'%s changed the status of %s from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
(),
$this
->
renderValue
(
$old_name
),
$this
->
renderValue
(
$new_name
));
}
public
function
getIcon
()
{
return
$this
->
getNewStatusObject
()->
getTransactionIcon
();
}
private
function
getOldStatusObject
()
{
return
$this
->
newStatusObject
(
$this
->
getOldValue
());
}
private
function
getNewStatusObject
()
{
return
$this
->
newStatusObject
(
$this
->
getNewValue
());
}
private
function
newStatusObject
(
$value
)
{
return
SlowvotePollStatus
::
newStatusObject
(
$value
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 6:46 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
102523
Default Alt Text
PhabricatorSlowvoteStatusTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment