Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F36276542
PHUIBoxView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
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
()
{
$outer_classes
=
array
();
$outer_classes
[]
=
'phui-box'
;
if
(
$this
->
border
)
{
$outer_classes
[]
=
'phui-box-border'
;
}
foreach
(
$this
->
margin
as
$margin
)
{
$outer_classes
[]
=
$margin
;
}
return
array
(
'class'
=>
$outer_classes
);
}
public
function
getTagName
()
{
return
'div'
;
}
public
function
getTagContent
()
{
require_celerity_resource
(
'phui-box-css'
);
$inner_classes
=
array
();
$inner_classes
[]
=
'phui-box-inner'
;
foreach
(
$this
->
padding
as
$padding
)
{
$inner_classes
[]
=
$padding
;
}
return
phutil_tag
(
'div'
,
array
(
'class'
=>
implode
(
' '
,
$inner_classes
)
),
$this
->
renderChildren
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Feb 22, 6:46 PM (1 h, 32 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
93/8b/8282349a93145fa0777a3ec04833
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment