Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIObjectBoxView.php
| Show All 12 Lines | final class PHUIObjectBoxView extends AphrontTagView { | ||||
| private $validationException; | private $validationException; | ||||
| private $header; | private $header; | ||||
| private $flush; | private $flush; | ||||
| private $actionListID; | private $actionListID; | ||||
| private $objectList; | private $objectList; | ||||
| private $table; | private $table; | ||||
| private $collapsed = false; | private $collapsed = false; | ||||
| private $anchor; | private $anchor; | ||||
| private $pager; | |||||
| private $showAction; | private $showAction; | ||||
| private $hideAction; | private $hideAction; | ||||
| private $showHideHref; | private $showHideHref; | ||||
| private $showHideContent; | private $showHideContent; | ||||
| private $showHideOpen; | private $showHideOpen; | ||||
| private $propertyLists = array(); | private $propertyLists = array(); | ||||
| ▲ Show 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | public function setTable($table) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setCollapsed($collapsed) { | public function setCollapsed($collapsed) { | ||||
| $this->collapsed = $collapsed; | $this->collapsed = $collapsed; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setPager(PHUIPagerView $pager) { | |||||
| $this->pager = $pager; | |||||
| return $this; | |||||
| } | |||||
| public function setAnchor(PhabricatorAnchorView $anchor) { | public function setAnchor(PhabricatorAnchorView $anchor) { | ||||
| $this->anchor = $anchor; | $this->anchor = $anchor; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setShowHide($show, $hide, $content, $href, $open = false) { | public function setShowHide($show, $hide, $content, $href, $open = false) { | ||||
| $this->showAction = $show; | $this->showAction = $show; | ||||
| $this->hideAction = $hide; | $this->hideAction = $hide; | ||||
| ▲ Show 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | if ($this->propertyLists) { | ||||
| $lists->addPropertyList($list); | $lists->addPropertyList($list); | ||||
| $ii++; | $ii++; | ||||
| } | } | ||||
| } else { | } else { | ||||
| $lists = null; | $lists = null; | ||||
| } | } | ||||
| $pager = null; | |||||
| if ($this->pager) { | |||||
| $pager = phutil_tag_div('phui-object-box-pager', $this->pager); | |||||
| } | |||||
| $content = array( | $content = array( | ||||
| ($this->showHideOpen == false ? $this->anchor : null), | ($this->showHideOpen == false ? $this->anchor : null), | ||||
| $header, | $header, | ||||
| $this->infoView, | $this->infoView, | ||||
| $this->formErrors, | $this->formErrors, | ||||
| $this->formSaved, | $this->formSaved, | ||||
| $exception_errors, | $exception_errors, | ||||
| $this->form, | $this->form, | ||||
| $this->tabGroups, | $this->tabGroups, | ||||
| $showhide, | $showhide, | ||||
| ($this->showHideOpen == true ? $this->anchor : null), | ($this->showHideOpen == true ? $this->anchor : null), | ||||
| $lists, | $lists, | ||||
| $this->table, | $this->table, | ||||
| $pager, | |||||
| $this->renderChildren(), | $this->renderChildren(), | ||||
| ); | ); | ||||
| if ($this->objectList) { | if ($this->objectList) { | ||||
| $content[] = $this->objectList; | $content[] = $this->objectList; | ||||
| } | } | ||||
| return $content; | return $content; | ||||
| } | } | ||||
| } | } | ||||