Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / view / phui / PHUILeftRightView.php
blobc3873c4899e3e7556540488512c7571fc594499c
1 <?php
3 final class PHUILeftRightView extends AphrontTagView {
5 private $left;
6 private $right;
7 private $verticalAlign;
9 const ALIGN_TOP = 'top';
10 const ALIGN_MIDDLE = 'middle';
11 const ALIGN_BOTTOM = 'bottom';
13 public function setLeft($left) {
14 $this->left = $left;
15 return $this;
18 public function setRight($right) {
19 $this->right = $right;
20 return $this;
23 public function setVerticalAlign($align) {
24 $this->verticalAlign = $align;
25 return $this;
28 protected function getTagAttributes() {
29 require_celerity_resource('phui-left-right-css');
31 $classes = array();
32 $classes[] = 'phui-left-right-view';
34 if ($this->verticalAlign) {
35 $classes[] = 'phui-lr-view-'.$this->verticalAlign;
38 return array('class' => implode(' ', $classes));
41 protected function getTagName() {
42 return 'div';
45 protected function getTagContent() {
46 $left = phutil_tag_div('phui-left-view', $this->left);
47 $right = phutil_tag_div('phui-right-view', $this->right);
49 return phutil_tag_div('phui-lr-container', array($left, $right));