Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F952040
PHUIFormLayoutView.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
PHUIFormLayoutView.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
PHUIFormLayoutView
extends
AphrontView
{
private
$fullWidth
;
public
function
setFullWidth
(
$width
)
{
$this
->
fullWidth
=
$width
;
return
$this
;
}
public
function
appendInstructions
(
$text
)
{
return
$this
->
appendChild
(
phutil_tag
(
'div'
,
array
(
'class'
=>
'aphront-form-instructions'
,
),
$text
));
}
public
function
appendRemarkupInstructions
(
$remarkup
)
{
if
(
$this
->
getUser
()
===
null
)
{
throw
new
Exception
(
'Call `setUser` before appending Remarkup to PHUIFormLayoutView.'
);
}
return
$this
->
appendInstructions
(
PhabricatorMarkupEngine
::
renderOneObject
(
id
(
new
PhabricatorMarkupOneOff
())->
setContent
(
$remarkup
),
'default'
,
$this
->
getUser
()));
}
public
function
render
()
{
$classes
=
array
(
'phui-form-view'
);
if
(
$this
->
fullWidth
)
{
$classes
[]
=
'phui-form-full-width'
;
}
return
phutil_tag
(
'div'
,
array
(
'class'
=>
implode
(
' '
,
$classes
),
),
$this
->
renderChildren
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 3:28 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
226313
Default Alt Text
PHUIFormLayoutView.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment