Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIWorkpanelView.php
| <?php | <?php | ||||
| final class PHUIWorkpanelView extends AphrontTagView { | final class PHUIWorkpanelView extends AphrontTagView { | ||||
| private $cards = array(); | private $cards = array(); | ||||
| private $header; | private $header; | ||||
| private $subheader = null; | private $subheader = null; | ||||
| private $headerURI; | |||||
| private $footerAction; | private $footerAction; | ||||
| private $headerColor = PHUIActionHeaderView::HEADER_GREY; | private $headerColor = PHUIActionHeaderView::HEADER_GREY; | ||||
| private $headerActions = array(); | private $headerActions = array(); | ||||
| private $headerTag; | private $headerTag; | ||||
| private $headerIcon; | private $headerIcon; | ||||
| public function setHeaderIcon(PHUIIconView $header_icon) { | public function setHeaderIcon(PHUIIconView $header_icon) { | ||||
| $this->headerIcon = $header_icon; | $this->headerIcon = $header_icon; | ||||
| Show All 14 Lines | public function setHeader($header) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setSubheader($subheader) { | public function setSubheader($subheader) { | ||||
| $this->subheader = $subheader; | $this->subheader = $subheader; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setHeaderURI($header_uri) { | |||||
| $this->headerURI = $header_uri; | |||||
| return $this; | |||||
| } | |||||
| public function setFooterAction(PHUIListItemView $footer_action) { | public function setFooterAction(PHUIListItemView $footer_action) { | ||||
| $this->footerAction = $footer_action; | $this->footerAction = $footer_action; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setHeaderColor($header_color) { | public function setHeaderColor($header_color) { | ||||
| $this->headerColor = $header_color; | $this->headerColor = $header_color; | ||||
| return $this; | return $this; | ||||
| ▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | $body = phutil_tag( | ||||
| ), | ), | ||||
| $this->cards); | $this->cards); | ||||
| $view = phutil_tag( | $view = phutil_tag( | ||||
| 'div', | 'div', | ||||
| array( | array( | ||||
| 'class' => implode(' ', $classes), | 'class' => implode(' ', $classes), | ||||
| ), | ), | ||||
| array( | array( | ||||
| isset($this->headerURI) ? | |||||
| phutil_tag('a', array('href' => $this->headerURI), $header): | |||||
| $header, | $header, | ||||
| $body, | $body, | ||||
| $footer, | $footer, | ||||
| )); | )); | ||||
| return $view; | return $view; | ||||
| } | } | ||||
| } | } | ||||