Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90709536
PHUIFormBoxView.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
Mon, Nov 4, 01:43
Size
982 B
Mime Type
text/x-php
Expires
Wed, Nov 6, 01:43 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22123035
Attached To
rPH Phabricator
PHUIFormBoxView.php
View Options
<?php
final
class
PHUIFormBoxView
extends
AphrontView
{
private
$headerText
;
private
$formError
=
null
;
private
$form
;
public
function
setHeaderText
(
$text
)
{
$this
->
headerText
=
$text
;
return
$this
;
}
public
function
setFormError
(
$error
)
{
$this
->
formError
=
$error
;
return
$this
;
}
public
function
setForm
(
AphrontFormView
$form
)
{
$this
->
form
=
$form
;
return
$this
;
}
public
function
render
()
{
$error
=
$this
->
formError
?
$this
->
formError
:
null
;
$header
=
id
(
new
PhabricatorActionHeaderView
())
->
setHeaderTitle
(
$this
->
headerText
)
->
setHeaderColor
(
PhabricatorActionHeaderView
::
HEADER_LIGHTBLUE
);
$content
=
id
(
new
PHUIBoxView
())
->
appendChild
(
array
(
$header
,
$error
,
$this
->
form
))
->
setBorder
(
true
)
->
addMargin
(
PHUI
::
MARGIN_LARGE_TOP
)
->
addMargin
(
PHUI
::
MARGIN_LARGE_LEFT
)
->
addMargin
(
PHUI
::
MARGIN_LARGE_RIGHT
)
->
addClass
(
'phui-form-box'
);
return
$content
;
}
}
Event Timeline
Log In to Comment