@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
fork

Configure Feed

Select the types of activity you want to include in your feed.

at recaptime-dev/main 50 lines 901 B view raw
1<?php 2 3final class PhabricatorOptionExportField 4 extends PhabricatorExportField { 5 6 private $options; 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 /** 18 * @return array|null 19 */ 20 public function getNaturalValue($value) { 21 if ($value === null) { 22 return $value; 23 } 24 25 if (!strlen($value)) { 26 return null; 27 } 28 29 $options = $this->getOptions(); 30 31 return array( 32 'value' => (string)$value, 33 'name' => (string)idx($options, $value, $value), 34 ); 35 } 36 37 public function getTextValue($value) { 38 $natural_value = $this->getNaturalValue($value); 39 if ($natural_value === null) { 40 return null; 41 } 42 43 return $natural_value['name']; 44 } 45 46 public function getPHPExcelValue($value) { 47 return $this->getTextValue($value); 48 } 49 50}