Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIWorkboardView.php
<?php | <?php | ||||
final class PHUIWorkboardView extends AphrontView { | final class PHUIWorkboardView extends AphrontTagView { | ||||
private $panels = array(); | private $panels = array(); | ||||
private $fluidLayout = false; | private $fluidLayout = false; | ||||
private $fluidishLayout = false; | private $fluidishLayout = false; | ||||
private $actions = array(); | private $actions = array(); | ||||
public function addPanel(PHUIWorkpanelView $panel) { | public function addPanel(PHUIWorkpanelView $panel) { | ||||
$this->panels[] = $panel; | $this->panels[] = $panel; | ||||
Show All 10 Lines | public function setFluidishLayout($layout) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function addAction(PHUIIconView $action) { | public function addAction(PHUIIconView $action) { | ||||
$this->actions[] = $action; | $this->actions[] = $action; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function render() { | public function getTagAttributes() { | ||||
return array( | |||||
'class' => 'phui-workboard-view', | |||||
); | |||||
} | |||||
public function getTagContent() { | |||||
require_celerity_resource('phui-workboard-view-css'); | require_celerity_resource('phui-workboard-view-css'); | ||||
$action_list = null; | $action_list = null; | ||||
if (!empty($this->actions)) { | if (!empty($this->actions)) { | ||||
$items = array(); | $items = array(); | ||||
foreach ($this->actions as $action) { | foreach ($this->actions as $action) { | ||||
$items[] = phutil_tag( | $items[] = phutil_tag( | ||||
'li', | 'li', | ||||
Show All 24 Lines | public function getTagContent() { | ||||
$board = phutil_tag( | $board = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'phui-workboard-view-shadow' | 'class' => 'phui-workboard-view-shadow' | ||||
), | ), | ||||
$view); | $view); | ||||
return phutil_tag( | return array( | ||||
'div', | |||||
array( | |||||
'class' => 'phui-workboard-view' | |||||
), | |||||
array( | |||||
$action_list, | $action_list, | ||||
$board | $board, | ||||
)); | ); | ||||
} | } | ||||
} | } |