Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F450597
AphrontFormLayoutView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
AphrontFormLayoutView.php
View Options
<?php
/**
* This provides the layout of an AphrontFormView without actually providing
* the <form /> tag. Useful on its own for creating forms in other forms (like
* dialogs) or forms which aren't submittable.
*/
final
class
AphrontFormLayoutView
extends
AphrontView
{
private
$backgroundShading
;
private
$padded
;
private
$fullWidth
;
public
function
setBackgroundShading
(
$shading
)
{
$this
->
backgroundShading
=
$shading
;
return
$this
;
}
public
function
setPadded
(
$padded
)
{
$this
->
padded
=
$padded
;
return
$this
;
}
public
function
setFullWidth
(
$width
)
{
$this
->
fullWidth
=
$width
;
return
$this
;
}
public
function
render
()
{
$classes
=
array
(
'aphront-form-view'
);
if
(
$this
->
backgroundShading
)
{
$classes
[]
=
'aphront-form-view-shaded'
;
}
if
(
$this
->
padded
)
{
$classes
[]
=
'aphront-form-view-padded'
;
}
if
(
$this
->
fullWidth
)
{
$classes
[]
=
'aphront-form-full-width'
;
}
$classes
=
implode
(
' '
,
$classes
);
return
phutil_tag
(
'div'
,
array
(
'class'
=>
$classes
,
),
$this
->
renderChildren
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 8:50 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
67805
Default Alt Text
AphrontFormLayoutView.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment