Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97584840
PHUILeftRightView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jan 5, 11:44
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jan 7, 11:44 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23431154
Attached To
rPH Phabricator
PHUILeftRightView.php
View Options
<?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
));
}
}
Event Timeline
Log In to Comment