3 final class PHUIStatusItemView
extends AphrontTagView
{
13 const ICON_ACCEPT
= 'fa-check-circle';
14 const ICON_REJECT
= 'fa-times-circle';
15 const ICON_LEFT
= 'fa-chevron-circle-left';
16 const ICON_RIGHT
= 'fa-chevron-circle-right';
17 const ICON_UP
= 'fa-chevron-circle-up';
18 const ICON_DOWN
= 'fa-chevron-circle-down';
19 const ICON_QUESTION
= 'fa-question-circle';
20 const ICON_WARNING
= 'fa-exclamation-circle';
21 const ICON_INFO
= 'fa-info-circle';
22 const ICON_ADD
= 'fa-plus-circle';
23 const ICON_MINUS
= 'fa-minus-circle';
24 const ICON_OPEN
= 'fa-circle-o';
25 const ICON_CLOCK
= 'fa-clock-o';
26 const ICON_STAR
= 'fa-star';
28 public function setIcon($icon, $color = null, $label = null) {
30 $this->iconLabel
= $label;
31 $this->iconColor
= $color;
35 public function setTarget($target) {
36 $this->target
= $target;
40 public function setNote($note) {
45 public function setHighlighted($highlighted) {
46 $this->highlighted
= $highlighted;
50 public function setIsExiled($is_exiled) {
51 $this->isExiled
= $is_exiled;
55 protected function canAppendChild() {
59 protected function getTagName() {
63 protected function getTagAttributes() {
65 if ($this->highlighted
) {
66 $classes[] = 'phui-status-item-highlighted';
69 if ($this->isExiled
) {
70 $classes[] = 'phui-status-item-exiled';
78 protected function getTagContent() {
82 $icon = id(new PHUIIconView())
83 ->setIcon($this->icon
.' '.$this->iconColor
);
85 if ($this->iconLabel
) {
86 Javelin
::initBehavior('phabricator-tooltips');
87 $icon->addSigil('has-tooltip');
90 'tip' => $this->iconLabel
,
96 $target_cell = phutil_tag(
99 'class' => 'phui-status-item-target',
106 $note_cell = phutil_tag(
109 'class' => 'phui-status-item-note',