3 final class PHUICurtainView
extends AphrontTagView
{
6 private $panels = array();
8 public function addAction(PhabricatorActionView
$action) {
9 $this->getActionList()->addAction($action);
13 public function addPanel(PHUICurtainPanelView
$curtain_panel) {
14 $this->panels
[] = $curtain_panel;
18 public function newPanel() {
19 $panel = new PHUICurtainPanelView();
20 $this->addPanel($panel);
22 // By default, application panels go at the top of the curtain, above
24 $panel->setOrder(1000);
29 public function setActionList(PhabricatorActionListView
$action_list) {
30 $this->actionList
= $action_list;
34 public function getActionList() {
35 return $this->actionList
;
38 protected function canAppendChild() {
42 protected function getTagContent() {
43 $action_list = $this->actionList
;
45 require_celerity_resource('phui-curtain-view-css');
47 $panels = $this->renderPanels();
49 $box = id(new PHUIObjectBoxView())
50 ->appendChild($action_list)
51 ->appendChild($panels)
52 ->addClass('phui-two-column-properties');
54 // We want to hide this UI on mobile if there are no child panels
56 $box->addClass('curtain-no-panels');
62 private function renderPanels() {
63 $panels = $this->panels
;
64 $panels = msortv($panels, 'getOrderVector');