Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110100200
PHUIRemarkupView.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
Thu, Apr 24, 17:37
Size
649 B
Mime Type
text/x-php
Expires
Sat, Apr 26, 17:37 (2 d)
Engine
blob
Format
Raw Data
Handle
25785928
Attached To
rPH Phabricator
PHUIRemarkupView.php
View Options
<?php
/**
* Simple API for rendering blocks of Remarkup.
*
* Example usage:
*
* $fancy_text = new PHUIRemarkupView($viewer, $raw_remarkup);
* $view->appendChild($fancy_text);
*
*/
final
class
PHUIRemarkupView
extends
AphrontView
{
private
$corpus
;
public
function
__construct
(
PhabricatorUser
$viewer
,
$corpus
)
{
$this
->
setUser
(
$viewer
);
$this
->
corpus
=
$corpus
;
}
public
function
render
()
{
$viewer
=
$this
->
getUser
();
$corpus
=
$this
->
corpus
;
return
PhabricatorMarkupEngine
::
renderOneObject
(
id
(
new
PhabricatorMarkupOneOff
())
->
setContent
(
$corpus
),
'default'
,
$viewer
);
}
}
Event Timeline
Log In to Comment