3 final class PhabricatorOptionExportField
4 extends PhabricatorExportField
{
8 public function setOptions(array $options) {
9 $this->options
= $options;
13 public function getOptions() {
14 return $this->options
;
17 public function getNaturalValue($value) {
18 if ($value === null) {
22 if (!strlen($value)) {
26 $options = $this->getOptions();
29 'value' => (string)$value,
30 'name' => (string)idx($options, $value, $value),
34 public function getTextValue($value) {
35 $natural_value = $this->getNaturalValue($value);
36 if ($natural_value === null) {
40 return $natural_value['name'];
43 public function getPHPExcelValue($value) {
44 return $this->getTextValue($value);