Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96140855
PholioInlineViewController.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, Dec 23, 01:59
Size
990 B
Mime Type
text/x-php
Expires
Wed, Dec 25, 01:59 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
23131338
Attached To
rPH Phabricator
PholioInlineViewController.php
View Options
<?php
/**
* @group pholio
*/
final
class
PholioInlineViewController
extends
PholioController
{
private
$id
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
id
=
$data
[
'id'
];
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$inline_comment
=
id
(
new
PholioTransactionComment
())->
load
(
$this
->
id
);
$handle
=
PhabricatorObjectHandleData
::
loadOneHandle
(
$inline_comment
->
getAuthorPHID
(),
$user
);
$inline_view
=
id
(
new
PholioInlineCommentView
())
->
setHandle
(
$handle
)
->
setInlineComment
(
$inline_comment
);
if
(
$inline_comment
->
getEditPolicy
(
PhabricatorPolicyCapability
::
CAN_EDIT
)
==
$user
->
getPHID
()
&&
$inline_comment
->
getTransactionPHID
()
===
null
)
{
$inline_view
->
setEditable
(
true
);
}
return
id
(
new
AphrontAjaxResponse
())->
setContent
(
$inline_comment
->
toDictionary
()
+
array
(
'contentHTML'
=>
$inline_view
->
render
(),
));
}
}
Event Timeline
Log In to Comment