Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63381187
PonderAddAnswerView.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, May 19, 17:42
Size
1 KB
Mime Type
text/x-php
Expires
Tue, May 21, 17:42 (2 d)
Engine
blob
Format
Raw Data
Handle
17766613
Attached To
rPH Phabricator
PonderAddAnswerView.php
View Options
<?php
final
class
PonderAddAnswerView
extends
AphrontView
{
private
$question
;
private
$actionURI
;
private
$draft
;
public
function
setQuestion
(
$question
)
{
$this
->
question
=
$question
;
return
$this
;
}
public
function
setActionURI
(
$uri
)
{
$this
->
actionURI
=
$uri
;
return
$this
;
}
public
function
render
()
{
$is_serious
=
PhabricatorEnv
::
getEnvConfig
(
'phabricator.serious-business'
);
$question
=
$this
->
question
;
$header
=
id
(
new
PhabricatorHeaderView
())
->
setHeader
(
pht
(
'Add Answer'
));
$form
=
new
AphrontFormView
();
$form
->
setUser
(
$this
->
user
)
->
setAction
(
$this
->
actionURI
)
->
setWorkflow
(
true
)
->
addHiddenInput
(
'question_id'
,
$question
->
getID
())
->
appendChild
(
id
(
new
PhabricatorRemarkupControl
())
->
setName
(
'answer'
)
->
setLabel
(
pht
(
'Answer'
))
->
setError
(
true
)
->
setID
(
'answer-content'
)
->
setUser
(
$this
->
user
))
->
appendChild
(
id
(
new
AphrontFormSubmitControl
())
->
setValue
(
$is_serious
?
pht
(
'Add Answer'
)
:
pht
(
'Bequeath Wisdom'
)));
return
id
(
new
AphrontNullView
())
->
appendChild
(
array
(
$header
,
$form
,
))
->
render
();
}
}
Event Timeline
Log In to Comment