Differential D18410 Diff 44255 src/applications/differential/constants/DifferentialRevisionStatus.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/constants/DifferentialRevisionStatus.php
Show All 26 Lines | final class DifferentialRevisionStatus extends Phobject { | ||||
public function getIconColor() { | public function getIconColor() { | ||||
return idx($this->spec, 'color.icon', 'bluegrey'); | return idx($this->spec, 'color.icon', 'bluegrey'); | ||||
} | } | ||||
public function getTagColor() { | public function getTagColor() { | ||||
return idx($this->spec, 'color.tag', 'bluegrey'); | return idx($this->spec, 'color.tag', 'bluegrey'); | ||||
} | } | ||||
public function getTimelineIcon() { | |||||
return idx($this->spec, 'icon.timeline'); | |||||
} | |||||
public function getTimelineColor() { | |||||
return idx($this->spec, 'color.timeline'); | |||||
} | |||||
public function getANSIColor() { | public function getANSIColor() { | ||||
return idx($this->spec, 'color.ansi'); | return idx($this->spec, 'color.ansi'); | ||||
} | } | ||||
public function getDisplayName() { | public function getDisplayName() { | ||||
return idx($this->spec, 'name'); | return idx($this->spec, 'name'); | ||||
} | } | ||||
public function isClosedStatus() { | public function isClosedStatus() { | ||||
return idx($this->spec, 'closed'); | return idx($this->spec, 'closed'); | ||||
} | } | ||||
public function isAbandoned() { | public function isAbandoned() { | ||||
return ($this->key === self::ABANDONED); | return ($this->key === self::ABANDONED); | ||||
} | } | ||||
public function isAccepted() { | public function isAccepted() { | ||||
return ($this->key === self::ACCEPTED); | return ($this->key === self::ACCEPTED); | ||||
} | } | ||||
public function isNeedsReview() { | public function isNeedsReview() { | ||||
return ($this->key === self::NEEDS_REVIEW); | return ($this->key === self::NEEDS_REVIEW); | ||||
} | } | ||||
public function isNeedsRevision() { | |||||
return ($this->key === self::NEEDS_REVISION); | |||||
} | |||||
public function isPublished() { | public function isPublished() { | ||||
return ($this->key === self::PUBLISHED); | return ($this->key === self::PUBLISHED); | ||||
} | } | ||||
public function isChangePlanned() { | public function isChangePlanned() { | ||||
return ($this->key === self::CHANGES_PLANNED); | return ($this->key === self::CHANGES_PLANNED); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | private static function getMap() { | ||||
$close_on_accept = PhabricatorEnv::getEnvConfig( | $close_on_accept = PhabricatorEnv::getEnvConfig( | ||||
'differential.close-on-accept'); | 'differential.close-on-accept'); | ||||
return array( | return array( | ||||
self::NEEDS_REVIEW => array( | self::NEEDS_REVIEW => array( | ||||
'name' => pht('Needs Review'), | 'name' => pht('Needs Review'), | ||||
'legacy' => 0, | 'legacy' => 0, | ||||
'icon' => 'fa-code', | 'icon' => 'fa-code', | ||||
'icon.timeline' => 'fa-undo', | |||||
'closed' => false, | 'closed' => false, | ||||
'color.icon' => 'grey', | 'color.icon' => 'grey', | ||||
'color.tag' => 'bluegrey', | 'color.tag' => 'bluegrey', | ||||
'color.ansi' => 'magenta', | 'color.ansi' => 'magenta', | ||||
'color.timeline' => 'orange', | |||||
), | ), | ||||
self::NEEDS_REVISION => array( | self::NEEDS_REVISION => array( | ||||
'name' => pht('Needs Revision'), | 'name' => pht('Needs Revision'), | ||||
'legacy' => 1, | 'legacy' => 1, | ||||
'icon' => 'fa-refresh', | 'icon' => 'fa-refresh', | ||||
'icon.timeline' => 'fa-times', | |||||
'closed' => false, | 'closed' => false, | ||||
'color.icon' => 'red', | 'color.icon' => 'red', | ||||
'color.tag' => 'red', | 'color.tag' => 'red', | ||||
'color.ansi' => 'red', | 'color.ansi' => 'red', | ||||
'color.timeline' => 'red', | |||||
), | ), | ||||
self::CHANGES_PLANNED => array( | self::CHANGES_PLANNED => array( | ||||
'name' => pht('Changes Planned'), | 'name' => pht('Changes Planned'), | ||||
'legacy' => 5, | 'legacy' => 5, | ||||
'icon' => 'fa-headphones', | 'icon' => 'fa-headphones', | ||||
'closed' => false, | 'closed' => false, | ||||
'color.icon' => 'red', | 'color.icon' => 'red', | ||||
'color.tag' => 'red', | 'color.tag' => 'red', | ||||
'color.ansi' => 'red', | 'color.ansi' => 'red', | ||||
), | ), | ||||
self::ACCEPTED => array( | self::ACCEPTED => array( | ||||
'name' => pht('Accepted'), | 'name' => pht('Accepted'), | ||||
'legacy' => 2, | 'legacy' => 2, | ||||
'icon' => 'fa-check', | 'icon' => 'fa-check', | ||||
'icon.timeline' => 'fa-check', | |||||
'closed' => $close_on_accept, | 'closed' => $close_on_accept, | ||||
'color.icon' => 'green', | 'color.icon' => 'green', | ||||
'color.tag' => 'green', | 'color.tag' => 'green', | ||||
'color.ansi' => 'green', | 'color.ansi' => 'green', | ||||
'color.timeline' => 'green', | |||||
), | ), | ||||
self::PUBLISHED => array( | self::PUBLISHED => array( | ||||
'name' => pht('Closed'), | 'name' => pht('Closed'), | ||||
'legacy' => 3, | 'legacy' => 3, | ||||
'icon' => 'fa-check-square-o', | 'icon' => 'fa-check-square-o', | ||||
'closed' => true, | 'closed' => true, | ||||
'color.icon' => 'black', | 'color.icon' => 'black', | ||||
'color.tag' => 'indigo', | 'color.tag' => 'indigo', | ||||
Show All 15 Lines |