Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F440342
PhabricatorRemarkupUIExample.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorRemarkupUIExample.php
View Options
<?php
final
class
PhabricatorRemarkupUIExample
extends
PhabricatorUIExample
{
public
function
getName
()
{
return
pht
(
'Remarkup'
);
}
public
function
getDescription
()
{
return
pht
(
'Demonstrates the visual appearance of various Remarkup elements.'
);
}
public
function
renderExample
()
{
$viewer
=
$this
->
getRequest
()->
getUser
();
$content
=
pht
(
<<<EOCONTENT
This is some **remarkup text** using ~~exactly one style~~ //various styles//.
- Fruit
- Apple
- Banana
- Cherry
- Vegetables
1. Carrot
2. Celery
NOTE: This is a note.
(NOTE) This is also a note.
WARNING: This is a warning.
(WARNING) This is also a warning.
IMPORTANT: This is not really important.
(IMPORTANT) This isn't important either.
EOCONTENT
);
$remarkup
=
PhabricatorMarkupEngine
::
renderOneObject
(
id
(
new
PhabricatorMarkupOneOff
())->
setContent
(
$content
),
'default'
,
$viewer
);
$frame
=
id
(
new
PHUIBoxView
())
->
addPadding
(
PHUI
::
PADDING_LARGE
)
->
appendChild
(
$remarkup
);
return
id
(
new
PHUIObjectBoxView
())
->
setHeaderText
(
pht
(
'Remarkup Example'
))
->
appendChild
(
$frame
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 5:45 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
64047
Default Alt Text
PhabricatorRemarkupUIExample.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment