Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102713454
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, Feb 23, 10:56
Size
697 B
Mime Type
text/x-php
Expires
Tue, Feb 25, 10:56 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24403591
Attached To
rPH Phabricator
SlowvoteRemarkupRule.php
View Options
<?php
final
class
SlowvoteRemarkupRule
extends
PhabricatorObjectRemarkupRule
{
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