Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F512948
PhabricatorSlowvoteVotingMethodTransaction.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
PhabricatorSlowvoteVotingMethodTransaction.php
View Options
<?php
final
class
PhabricatorSlowvoteVotingMethodTransaction
extends
PhabricatorSlowvoteTransactionType
{
const
TRANSACTIONTYPE
=
'vote:method'
;
public
function
generateOldValue
(
$object
)
{
return
(
string
)
$object
->
getMethod
();
}
public
function
generateNewValue
(
$object
,
$value
)
{
return
(
string
)
$value
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setMethod
(
$value
);
}
public
function
getTitle
()
{
$old_name
=
$this
->
getOldVotingMethodObject
()->
getName
();
$new_name
=
$this
->
getNewVotingMethodObject
()->
getName
();
return
pht
(
'%s changed the voting method from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderValue
(
$old_name
),
$this
->
renderValue
(
$new_name
));
}
public
function
getTitleForFeed
()
{
$old_name
=
$this
->
getOldVotingMethodObject
()->
getName
();
$new_name
=
$this
->
getNewVotingMethodObject
()->
getName
();
return
pht
(
'%s changed the voting method of %s from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
(),
$this
->
renderValue
(
$old_name
),
$this
->
renderValue
(
$new_name
));
}
private
function
getOldVotingMethodObject
()
{
return
$this
->
newVotingMethodObject
(
$this
->
getOldValue
());
}
private
function
getNewVotingMethodObject
()
{
return
$this
->
newVotingMethodObject
(
$this
->
getNewValue
());
}
private
function
newVotingMethodObject
(
$value
)
{
return
SlowvotePollVotingMethod
::
newVotingMethodObject
(
$value
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 11, 12:25 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
105106
Default Alt Text
PhabricatorSlowvoteVotingMethodTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment