Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98725955
PhabricatorSlowvoteShuffleTransaction.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
Wed, Jan 15, 23:33
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Jan 17, 23:33 (2 d)
Engine
blob
Format
Raw Data
Handle
23634196
Attached To
rPH Phabricator
PhabricatorSlowvoteShuffleTransaction.php
View Options
<?php
final
class
PhabricatorSlowvoteShuffleTransaction
extends
PhabricatorSlowvoteTransactionType
{
const
TRANSACTIONTYPE
=
'vote:shuffle'
;
public
function
generateOldValue
(
$object
)
{
return
(
bool
)
$object
->
getShuffle
();
}
public
function
generateNewValue
(
$object
,
$value
)
{
return
(
bool
)
$value
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setShuffle
((
int
)
$value
);
}
public
function
getTitle
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
pht
(
'%s made poll responses appear in a random order.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s made poll responses appear in a fixed order.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
$new
=
$this
->
getNewValue
();
if
(
$new
)
{
return
pht
(
'%s made %s responses appear in a random order.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
else
{
return
pht
(
'%s made %s responses appear in a fixed order.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
}
public
function
getIcon
()
{
return
'fa-refresh'
;
}
}
Event Timeline
Log In to Comment