Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / slowvote / remarkup / SlowvoteRemarkupRule.php
blobc93757315be6e902b8a5f6ff7cfbb89d01a2c0fb
1 <?php
3 final class SlowvoteRemarkupRule extends PhabricatorObjectRemarkupRule {
5 protected function getObjectNamePrefix() {
6 return 'V';
9 protected function loadObjects(array $ids) {
10 $viewer = $this->getEngine()->getConfig('viewer');
12 return id(new PhabricatorSlowvoteQuery())
13 ->setViewer($viewer)
14 ->withIDs($ids)
15 ->needOptions(true)
16 ->needChoices(true)
17 ->needViewerChoices(true)
18 ->execute();
21 protected function renderObjectEmbed(
22 $object,
23 PhabricatorObjectHandle $handle,
24 $options) {
26 $viewer = $this->getEngine()->getConfig('viewer');
28 $embed = id(new SlowvoteEmbedView())
29 ->setUser($viewer)
30 ->setPoll($object);
32 return $embed;