Differential D20303 Diff 48501 src/applications/project/trigger/PhabricatorProjectTriggerManiphestStatusRule.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/trigger/PhabricatorProjectTriggerManiphestStatusRule.php
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | protected function getPHUIXControlSpecification() { | ||||
| $map = ManiphestTaskStatus::getTaskStatusMap(); | $map = ManiphestTaskStatus::getTaskStatusMap(); | ||||
| return array( | return array( | ||||
| 'options' => $map, | 'options' => $map, | ||||
| 'order' => array_keys($map), | 'order' => array_keys($map), | ||||
| ); | ); | ||||
| } | } | ||||
| public function getRuleViewLabel() { | |||||
| return pht('Change Status'); | |||||
| } | |||||
| public function getRuleViewDescription($value) { | |||||
| $status_name = ManiphestTaskStatus::getTaskStatusName($value); | |||||
| return pht( | |||||
| 'Change task status to %s.', | |||||
| phutil_tag('strong', array(), $status_name)); | |||||
| } | |||||
| public function getRuleViewIcon($value) { | |||||
| $status_icon = ManiphestTaskStatus::getStatusIcon($value); | |||||
| $status_color = ManiphestTaskStatus::getStatusColor($value); | |||||
| return id(new PHUIIconView()) | |||||
| ->setIcon($status_icon, $status_color); | |||||
| } | |||||
| } | } | ||||