Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIObjectBoxView.php
Show All 19 Lines | final class PHUIObjectBoxView extends AphrontTagView { | ||||
private $anchor; | private $anchor; | ||||
private $pager; | private $pager; | ||||
private $showAction; | private $showAction; | ||||
private $hideAction; | private $hideAction; | ||||
private $showHideHref; | private $showHideHref; | ||||
private $showHideContent; | private $showHideContent; | ||||
private $showHideOpen; | private $showHideOpen; | ||||
private $noBorder; | |||||
private $propertyLists = array(); | private $propertyLists = array(); | ||||
const COLOR_RED = 'red'; | const COLOR_RED = 'red'; | ||||
const COLOR_BLUE = 'blue'; | const COLOR_BLUE = 'blue'; | ||||
const COLOR_GREEN = 'green'; | const COLOR_GREEN = 'green'; | ||||
const COLOR_YELLOW = 'yellow'; | const COLOR_YELLOW = 'yellow'; | ||||
▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | public function setShowHide($show, $hide, $content, $href, $open = false) { | ||||
$this->showAction = $show; | $this->showAction = $show; | ||||
$this->hideAction = $hide; | $this->hideAction = $hide; | ||||
$this->showHideContent = $content; | $this->showHideContent = $content; | ||||
$this->showHideHref = $href; | $this->showHideHref = $href; | ||||
$this->showHideOpen = $open; | $this->showHideOpen = $open; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setNoBorder($no_border) { | |||||
$this->noBorder = $no_border; | |||||
return $this; | |||||
} | |||||
public function setValidationException( | public function setValidationException( | ||||
PhabricatorApplicationTransactionValidationException $ex = null) { | PhabricatorApplicationTransactionValidationException $ex = null) { | ||||
$this->validationException = $ex; | $this->validationException = $ex; | ||||
return $this; | return $this; | ||||
} | } | ||||
protected function getTagAttributes() { | protected function getTagAttributes() { | ||||
$classes = array(); | $classes = array(); | ||||
$classes[] = 'phui-box'; | $classes[] = 'phui-box'; | ||||
if (!$this->noBorder) { | |||||
$classes[] = 'phui-box-border'; | $classes[] = 'phui-box-border'; | ||||
} | |||||
$classes[] = 'phui-object-box'; | $classes[] = 'phui-object-box'; | ||||
$classes[] = 'mlt mll mlr'; | $classes[] = 'mlt mll mlr'; | ||||
if ($this->color) { | if ($this->color) { | ||||
$classes[] = 'phui-object-box-'.$this->color; | $classes[] = 'phui-object-box-'.$this->color; | ||||
} | } | ||||
if ($this->collapsed) { | if ($this->collapsed) { | ||||
▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines |