3 final class AphrontFormHandlesControl
extends AphrontFormControl
{
7 protected function getCustomControlClass() {
8 return 'aphront-form-control-handles';
11 public function setIsInvisible($is_invisible) {
12 $this->isInvisible
= $is_invisible;
16 public function getIsInvisible() {
17 return $this->isInvisible
;
20 protected function shouldRender() {
21 return (bool)$this->getValue();
24 public function getLabel() {
25 // TODO: This is a bit funky and still rendering a few pixels of padding
26 // on the form, but there's currently no way to get a control to only emit
27 // hidden inputs. Clean this up eventually.
29 if ($this->getIsInvisible()) {
33 return parent
::getLabel();
36 protected function renderInput() {
37 $value = $this->getValue();
38 $viewer = $this->getUser();
42 if (!$this->getIsInvisible()) {
43 $list = $viewer->renderHandleList($value);
44 $list = id(new PHUIBoxView())
45 ->addPadding(PHUI
::PADDING_SMALL_TOP
)
51 foreach ($value as $phid) {
52 $inputs[] = phutil_tag(
56 'name' => $this->getName().'[]',