@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
at recaptime-dev/main 83 lines 1.5 kB view raw
1<?php 2 3final class PhabricatorChartFunctionLabel 4 extends Phobject { 5 6 private $key; 7 private $name; 8 private $color; 9 private $icon; 10 private $fillColor; 11 12 public function setKey($key) { 13 $this->key = $key; 14 return $this; 15 } 16 17 /** 18 * @return string Internal identifier of the line, e.g. "moved-in" 19 */ 20 public function getKey() { 21 return $this->key; 22 } 23 24 public function setName($name) { 25 $this->name = $name; 26 return $this; 27 } 28 29 /** 30 * @return string User-visible label describing what the line represents, 31 * e.g. "Open Tasks" 32 */ 33 public function getName() { 34 return $this->name; 35 } 36 37 public function setColor($color) { 38 $this->color = $color; 39 return $this; 40 } 41 42 /** 43 * @return string Color of the line, such as 'rgba(128, 128, 200, 1)' 44 */ 45 public function getColor() { 46 return $this->color; 47 } 48 49 public function setIcon($icon) { 50 $this->icon = $icon; 51 return $this; 52 } 53 54 public function getIcon() { 55 return $this->icon; 56 } 57 58 public function setFillColor($fill_color) { 59 $this->fillColor = $fill_color; 60 return $this; 61 } 62 63 /** 64 * @return string Color of the area, such as 'rgba(128, 128, 200, 0.15)' 65 */ 66 public function getFillColor() { 67 return $this->fillColor; 68 } 69 70 /** 71 * @return array 72 */ 73 public function toWireFormat() { 74 return array( 75 'key' => $this->getKey(), 76 'name' => $this->getName(), 77 'color' => $this->getColor(), 78 'icon' => $this->getIcon(), 79 'fillColor' => $this->getFillColor(), 80 ); 81 } 82 83}