Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
PHP
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152<?php
final class PHUILeftRightView extends AphrontTagView {
private $left; private $right; private $verticalAlign;
const ALIGN_TOP = 'top'; const ALIGN_MIDDLE = 'middle'; const ALIGN_BOTTOM = 'bottom';
public function setLeft($left) { $this->left = $left; return $this; }
public function setRight($right) { $this->right = $right; return $this; }
public function setVerticalAlign($align) { $this->verticalAlign = $align; return $this; }
protected function getTagAttributes() { require_celerity_resource('phui-left-right-css');
$classes = array(); $classes[] = 'phui-left-right-view';
if ($this->verticalAlign) { $classes[] = 'phui-lr-view-'.$this->verticalAlign; }
return array('class' => implode(' ', $classes)); }
protected function getTagName() { return 'div'; }
protected function getTagContent() { $left = phutil_tag_div('phui-left-view', $this->left); $right = phutil_tag_div('phui-right-view', $this->right);
return phutil_tag_div('phui-lr-container', array($left, $right)); }}