Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93916819
PhrictionMarkupPreviewController.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 2, 12:11
Size
678 B
Mime Type
text/x-php
Expires
Wed, Dec 4, 12:11 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22722657
Attached To
rPH Phabricator
PhrictionMarkupPreviewController.php
View Options
<?php
final
class
PhrictionMarkupPreviewController
extends
PhabricatorController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$viewer
=
$request
->
getUser
();
$text
=
$request
->
getStr
(
'text'
);
$slug
=
$request
->
getURIData
(
'slug'
);
$output
=
PhabricatorMarkupEngine
::
renderOneObject
(
id
(
new
PhabricatorMarkupOneOff
())
->
setPreserveLinebreaks
(
true
)
->
setDisableCache
(
true
)
->
setContent
(
$text
),
'default'
,
$viewer
,
array
(
'phriction.isPreview'
=>
true
,
'phriction.slug'
=>
$slug
,
));
return
id
(
new
AphrontAjaxResponse
())
->
setContent
(
$output
);
}
}
Event Timeline
Log In to Comment