Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIStatusItemView.php
| <?php | <?php | ||||
| final class PHUIStatusItemView extends AphrontTagView { | final class PHUIStatusItemView extends AphrontTagView { | ||||
| private $icon; | private $icon; | ||||
| private $iconLabel; | private $iconLabel; | ||||
| private $iconColor; | private $iconColor; | ||||
| private $target; | private $target; | ||||
| private $note; | private $note; | ||||
| private $highlighted; | private $highlighted; | ||||
| private $isExiled; | |||||
| const ICON_ACCEPT = 'fa-check-circle'; | const ICON_ACCEPT = 'fa-check-circle'; | ||||
| const ICON_REJECT = 'fa-times-circle'; | const ICON_REJECT = 'fa-times-circle'; | ||||
| const ICON_LEFT = 'fa-chevron-circle-left'; | const ICON_LEFT = 'fa-chevron-circle-left'; | ||||
| const ICON_RIGHT = 'fa-chevron-circle-right'; | const ICON_RIGHT = 'fa-chevron-circle-right'; | ||||
| const ICON_UP = 'fa-chevron-circle-up'; | const ICON_UP = 'fa-chevron-circle-up'; | ||||
| const ICON_DOWN = 'fa-chevron-circle-down'; | const ICON_DOWN = 'fa-chevron-circle-down'; | ||||
| const ICON_QUESTION = 'fa-question-circle'; | const ICON_QUESTION = 'fa-question-circle'; | ||||
| Show All 22 Lines | public function setNote($note) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setHighlighted($highlighted) { | public function setHighlighted($highlighted) { | ||||
| $this->highlighted = $highlighted; | $this->highlighted = $highlighted; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setIsExiled($is_exiled) { | |||||
| $this->isExiled = $is_exiled; | |||||
| return $this; | |||||
| } | |||||
| protected function canAppendChild() { | protected function canAppendChild() { | ||||
| return false; | return false; | ||||
| } | } | ||||
| protected function getTagName() { | protected function getTagName() { | ||||
| return 'tr'; | return 'tr'; | ||||
| } | } | ||||
| protected function getTagAttributes() { | protected function getTagAttributes() { | ||||
| $classes = array(); | $classes = array(); | ||||
| if ($this->highlighted) { | if ($this->highlighted) { | ||||
| $classes[] = 'phui-status-item-highlighted'; | $classes[] = 'phui-status-item-highlighted'; | ||||
| } | } | ||||
| if ($this->isExiled) { | |||||
| $classes[] = 'phui-status-item-exiled'; | |||||
| } | |||||
| return array( | return array( | ||||
| 'class' => $classes, | 'class' => $classes, | ||||
| ); | ); | ||||
| } | } | ||||
| protected function getTagContent() { | protected function getTagContent() { | ||||
| $icon = null; | $icon = null; | ||||
| Show All 38 Lines | |||||