Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIListItemView.php
Show All 23 Lines | final class PHUIListItemView extends AphrontTagView { | ||||
private $renderNameAsTooltip; | private $renderNameAsTooltip; | ||||
private $statusColor; | private $statusColor; | ||||
private $order; | private $order; | ||||
private $aural; | private $aural; | ||||
private $profileImage; | private $profileImage; | ||||
private $indented; | private $indented; | ||||
private $hideInApplicationMenu; | private $hideInApplicationMenu; | ||||
private $icons = array(); | private $icons = array(); | ||||
private $openInNewWindow = false; | |||||
public function setOpenInNewWindow($open_in_new_window) { | |||||
$this->openInNewWindow = $open_in_new_window; | |||||
return $this; | |||||
} | |||||
public function getOpenInNewWindow() { | |||||
return $this->openInNewWindow; | |||||
} | |||||
public function setHideInApplicationMenu($hide) { | public function setHideInApplicationMenu($hide) { | ||||
$this->hideInApplicationMenu = $hide; | $this->hideInApplicationMenu = $hide; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getHideInApplicationMenu() { | public function getHideInApplicationMenu() { | ||||
return $this->hideInApplicationMenu; | return $this->hideInApplicationMenu; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 247 Lines • ▼ Show 20 Lines | protected function getTagContent() { | ||||
return javelin_tag( | return javelin_tag( | ||||
$this->href ? 'a' : 'div', | $this->href ? 'a' : 'div', | ||||
array( | array( | ||||
'href' => $this->href, | 'href' => $this->href, | ||||
'class' => implode(' ', $classes), | 'class' => implode(' ', $classes), | ||||
'meta' => $meta, | 'meta' => $meta, | ||||
'sigil' => $sigil, | 'sigil' => $sigil, | ||||
'target' => $this->getOpenInNewWindow() ? '_blank' : null, | |||||
), | ), | ||||
array( | array( | ||||
$aural, | $aural, | ||||
$icon, | $icon, | ||||
$icons, | $icons, | ||||
$this->renderChildren(), | $this->renderChildren(), | ||||
$name, | $name, | ||||
)); | )); | ||||
} | } | ||||
} | } |