Differential D19433 Diff 46484 src/applications/transactions/editfield/PhabricatorCheckboxesEditField.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editfield/PhabricatorCheckboxesEditField.php
- This file was added.
<?php | |||||
final class PhabricatorCheckboxesEditField | |||||
extends PhabricatorEditField { | |||||
private $options; | |||||
protected function newControl() { | |||||
$options = $this->getOptions(); | |||||
return id(new AphrontFormCheckboxControl()) | |||||
->setOptions($options); | |||||
} | |||||
protected function newConduitParameterType() { | |||||
return new ConduitStringListParameterType(); | |||||
} | |||||
protected function newHTTPParameterType() { | |||||
return new AphrontStringListHTTPParameterType(); | |||||
} | |||||
public function setOptions(array $options) { | |||||
$this->options = $options; | |||||
return $this; | |||||
} | |||||
public function getOptions() { | |||||
if ($this->options === null) { | |||||
throw new PhutilInvalidStateException('setOptions'); | |||||
} | |||||
return $this->options; | |||||
} | |||||
} |