Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81604582
PonderAnswerHistoryController.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
Sat, Sep 7, 00:07
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Sep 9, 00:07 (2 d)
Engine
blob
Format
Raw Data
Handle
20600304
Attached To
rPH Phabricator
PonderAnswerHistoryController.php
View Options
<?php
final
class
PonderAnswerHistoryController
extends
PonderController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getViewer
();
$id
=
$request
->
getURIData
(
'id'
);
$answer
=
id
(
new
PonderAnswerQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$id
))
->
executeOne
();
if
(!
$answer
)
{
return
new
Aphront404Response
();
}
$timeline
=
$this
->
buildTransactionTimeline
(
$answer
,
new
PonderAnswerTransactionQuery
());
$timeline
->
setShouldTerminate
(
true
);
$qid
=
$answer
->
getQuestion
()->
getID
();
$aid
=
$answer
->
getID
();
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
setBorder
(
true
);
$crumbs
->
addTextCrumb
(
"Q{$qid}"
,
"/Q{$qid}"
);
$crumbs
->
addTextCrumb
(
"A{$aid}"
,
"/Q{$qid}#{$aid}"
);
$crumbs
->
addTextCrumb
(
pht
(
'History'
));
$crumbs
->
setBorder
(
true
);
$header
=
id
(
new
PHUIHeaderView
())
->
setHeader
(
pht
(
'Answer History'
))
->
setHeaderIcon
(
'fa-history'
);
$view
=
id
(
new
PHUITwoColumnView
())
->
setHeader
(
$header
)
->
setFooter
(
$timeline
);
return
$this
->
newPage
()
->
setTitle
(
pht
(
'Answer History'
))
->
setCrumbs
(
$crumbs
)
->
appendChild
(
$view
);
}
}
Event Timeline
Log In to Comment