public static function getColorMap() { $shades = PHUITagView::getShadeMap(); $shades = array_select_keys($shades, array(PhabricatorProject::DEFAULT_COLOR)) + $shades; unset($shades[PHUITagView::COLOR_DISABLED]); return $shades; }
public function setTagColor($color) { static $colors; if (!$colors) { $colors = array_fuse(array_keys(PHUITagView::getShadeMap())); } if (isset($colors[$color])) { $this->tagColor = $color; } return $this; }