Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97993024
PonderQuestionDetailView.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
Wed, Jan 8, 09:26
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Jan 10, 09:26 (2 d)
Engine
blob
Format
Raw Data
Handle
23474902
Attached To
rPH Phabricator
PonderQuestionDetailView.php
View Options
<?php
final
class
PonderQuestionDetailView
extends
AphrontView
{
private
$question
;
private
$handles
;
public
function
setQuestion
(
$question
)
{
$this
->
question
=
$question
;
return
$this
;
}
public
function
setHandles
(
$handles
)
{
$this
->
handles
=
$handles
;
return
$this
;
}
public
function
render
()
{
require_celerity_resource
(
'ponder-core-view-css'
);
$question
=
$this
->
question
;
$handles
=
$this
->
handles
;
$user
=
$this
->
user
;
$panel
=
id
(
new
AphrontPanelView
())
->
addClass
(
"ponder-panel"
);
$contentview
=
new
PonderPostBodyView
();
$contentview
->
setTarget
(
$question
)
->
setQuestion
(
$question
)
->
setUser
(
$user
)
->
setHandles
(
$handles
)
->
setAction
(
PonderConstants
::
ASKED_LITERAL
);
$commentview
=
new
PonderCommentListView
();
$commentview
->
setUser
(
$user
)
->
setHandles
(
$handles
)
->
setComments
(
$question
->
getComments
())
->
setTarget
(
$question
->
getPHID
())
->
setQuestionID
(
$question
->
getID
())
->
setActionURI
(
new
PhutilURI
(
'/ponder/comment/add/'
));
$panel
->
appendChild
(
$contentview
);
$panel
->
appendChild
(
$commentview
);
return
$panel
->
render
();
}
}
Event Timeline
Log In to Comment