@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhabricatorEditEngineCheckboxesCommentAction
4 extends PhabricatorEditEngineCommentAction {
5
6 private $options = array();
7
8 public function setOptions(array $options) {
9 $this->options = $options;
10 return $this;
11 }
12
13 public function getOptions() {
14 return $this->options;
15 }
16
17 public function getPHUIXControlType() {
18 return 'checkboxes';
19 }
20
21 public function getPHUIXControlSpecification() {
22 $options = $this->getOptions();
23
24 $labels = array();
25 foreach ($options as $key => $option) {
26 $labels[$key] = hsprintf('%s', $option);
27 }
28
29 return array(
30 'value' => $this->getValue(),
31 'keys' => array_keys($options),
32 'labels' => $labels,
33 );
34 }
35
36}