Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99845751
SlowvoteRemarkupRule.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, Jan 26, 22:38
Size
726 B
Mime Type
text/x-php
Expires
Tue, Jan 28, 22:38 (2 d)
Engine
blob
Format
Raw Data
Handle
23832926
Attached To
rPH Phabricator
SlowvoteRemarkupRule.php
View Options
<?php
/**
* @group slowvote
*/
final
class
SlowvoteRemarkupRule
extends
PhabricatorRemarkupRuleObject
{
protected
function
getObjectNamePrefix
()
{
return
'V'
;
}
protected
function
loadObjects
(
array
$ids
)
{
$viewer
=
$this
->
getEngine
()->
getConfig
(
'viewer'
);
return
id
(
new
PhabricatorSlowvoteQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
$ids
)
->
needOptions
(
true
)
->
needChoices
(
true
)
->
needViewerChoices
(
true
)
->
execute
();
}
protected
function
renderObjectEmbed
(
$object
,
$handle
,
$options
)
{
$viewer
=
$this
->
getEngine
()->
getConfig
(
'viewer'
);
$embed
=
id
(
new
SlowvoteEmbedView
())
->
setUser
(
$viewer
)
->
setPoll
(
$object
);
return
$embed
;
}
}
Event Timeline
Log In to Comment