Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100759934
AphrontFormLayoutView.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, Feb 2, 12:47
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Feb 4, 12:47 (2 d)
Engine
blob
Format
Raw Data
Handle
24029195
Attached To
rPH Phabricator
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
());
}
}
Event Timeline
Log In to Comment