Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIObjectItemView.php
Show All 17 Lines | final class PHUIObjectItemView extends AphrontTagView { | ||||
private $actions = array(); | private $actions = array(); | ||||
private $headIcons = array(); | private $headIcons = array(); | ||||
private $disabled; | private $disabled; | ||||
private $imageURI; | private $imageURI; | ||||
private $state; | private $state; | ||||
private $fontIcon; | private $fontIcon; | ||||
private $imageIcon; | private $imageIcon; | ||||
private $titleText; | private $titleText; | ||||
private $badge; | |||||
const AGE_FRESH = 'fresh'; | const AGE_FRESH = 'fresh'; | ||||
const AGE_STALE = 'stale'; | const AGE_STALE = 'stale'; | ||||
const AGE_OLD = 'old'; | const AGE_OLD = 'old'; | ||||
const STATE_SUCCESS = 'green'; | const STATE_SUCCESS = 'green'; | ||||
const STATE_FAIL = 'red'; | const STATE_FAIL = 'red'; | ||||
const STATE_WARN = 'yellow'; | const STATE_WARN = 'yellow'; | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | public function setHeader($header) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setSubHead($subhead) { | public function setSubHead($subhead) { | ||||
$this->subhead = $subhead; | $this->subhead = $subhead; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setBadge(PHUIBadgeMiniView $badge) { | |||||
$this->badge = $badge; | |||||
return $this; | |||||
} | |||||
public function setTitleText($title_text) { | public function setTitleText($title_text) { | ||||
$this->titleText = $title_text; | $this->titleText = $title_text; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getTitleText() { | public function getTitleText() { | ||||
return $this->titleText; | return $this->titleText; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 473 Lines • ▼ Show 20 Lines | if ($status) { | ||||
$column0 = phutil_tag( | $column0 = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'phui-object-item-col0', | 'class' => 'phui-object-item-col0', | ||||
), | ), | ||||
$status); | $status); | ||||
} | } | ||||
if ($this->badge) { | |||||
epriestley: Prefer `//` comments inside methods. | |||||
$column0 = phutil_tag( | |||||
'div', | |||||
array( | |||||
'class' => 'phui-object-item-col0 phui-object-item-badge', | |||||
), | |||||
$this->badge); | |||||
} | |||||
$column1 = phutil_tag( | $column1 = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'phui-object-item-col1', | 'class' => 'phui-object-item-col1', | ||||
), | ), | ||||
array( | array( | ||||
$header, | $header, | ||||
$content, | $content, | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |
Prefer // comments inside methods.