Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F115077426
PHUIBoxView.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
Thu, May 29, 15:37
Size
1003 B
Mime Type
text/x-php
Expires
Sat, May 31, 15:37 (2 d)
Engine
blob
Format
Raw Data
Handle
26422671
Attached To
rPH Phabricator
PHUIBoxView.php
View Options
<?php
final
class
PHUIBoxView
extends
AphrontTagView
{
private
$margin
=
array
();
private
$padding
=
array
();
private
$border
=
false
;
public
function
addMargin
(
$margin
)
{
$this
->
margin
[]
=
$margin
;
return
$this
;
}
public
function
addPadding
(
$padding
)
{
$this
->
padding
[]
=
$padding
;
return
$this
;
}
public
function
setBorder
(
$border
)
{
$this
->
border
=
$border
;
return
$this
;
}
protected
function
getTagAttributes
()
{
require_celerity_resource
(
'phui-box-css'
);
$outer_classes
=
array
();
$outer_classes
[]
=
'phui-box'
;
if
(
$this
->
border
)
{
$outer_classes
[]
=
'phui-box-border'
;
}
foreach
(
$this
->
margin
as
$margin
)
{
$outer_classes
[]
=
$margin
;
}
foreach
(
$this
->
padding
as
$padding
)
{
$outer_classes
[]
=
$padding
;
}
return
array
(
'class'
=>
$outer_classes
);
}
public
function
getTagName
()
{
return
'div'
;
}
public
function
getTagContent
()
{
return
$this
->
renderChildren
();
}
}
Event Timeline
Log In to Comment