3 final class PHUIWorkpanelView
extends AphrontTagView
{
5 private $cards = array();
7 private $subheader = null;
9 private $headerActions = array();
14 public function setHeaderIcon($icon) {
15 $this->headerIcon
= $icon;
19 public function getHeaderIcon() {
20 return $this->headerIcon
;
23 public function setCards(PHUIObjectItemListView
$cards) {
24 $this->cards
[] = $cards;
28 public function setHeader($header) {
29 $this->header
= $header;
33 public function setSubheader($subheader) {
34 $this->subheader
= $subheader;
38 public function setFooterAction(PHUIListItemView
$footer_action) {
39 $this->footerAction
= $footer_action;
43 public function addHeaderAction(PHUIIconView
$action) {
44 $this->headerActions
[] = $action;
48 public function setHeaderTag(PHUITagView
$tag) {
49 $this->headerTag
= $tag;
53 public function setHref($href) {
58 public function getHref() {
62 protected function getTagAttributes() {
64 'class' => 'phui-workpanel-view',
68 protected function getTagContent() {
69 require_celerity_resource('phui-workpanel-view-css');
72 if ($this->footerAction
) {
73 $footer_tag = $this->footerAction
;
77 'class' => 'phui-workpanel-footer-action mst ps',
82 $header = id(new PHUIHeaderView())
83 ->setHeader($this->header
)
84 ->setSubheader($this->subheader
);
86 foreach ($this->headerActions
as $action) {
87 $header->addActionItem($action);
90 if ($this->headerTag
) {
91 $header->addActionItem($this->headerTag
);
94 if ($this->headerIcon
) {
95 $header->setHeaderIcon($this->headerIcon
);
98 $href = $this->getHref();
100 $header->setHref($href);
106 'class' => 'phui-workpanel-body-content',
110 $body = phutil_tag_div('phui-workpanel-body', $body);
112 $view = id(new PHUIBoxView())
113 ->setColor(PHUIBoxView
::GREY
)
114 ->addClass('phui-workpanel-view-inner')