1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications/maniphest/view/ManiphestView.php
Anh Nhan Nguyen 4c6ab5060e Streamline tag rendering for Differential and Maniphest
Summary:
Well, I'm just putting it into the DAO classes, or am I doing something wrong?

Will be used by future event listeners

Test Plan: Visited some tasks and revisions. Look fine.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5542
2013-04-03 08:28:18 -07:00

19 lines
506 B
PHP

<?php
/**
* @group maniphest
*/
abstract class ManiphestView extends AphrontView {
public static function renderTagForTask(ManiphestTask $task) {
$status = $task->getStatus();
$status_name = ManiphestTaskStatus::getTaskStatusFullName($status);
$status_color = ManiphestTaskStatus::getTaskStatusTagColor($status);
return id(new PhabricatorTagView())
->setType(PhabricatorTagView::TYPE_STATE)
->setName($status_name)
->setBackgroundColor($status_color);
}
}