[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorRemarkupExample extends PhabricatorUIExample { 4 5 public function getName() { 6 return pht('Remarkup'); 7 } 8 9 public function getDescription() { 10 return pht( 11 'Demonstrates the visual appearance of various Remarkup elements.'); 12 } 13 14 public function renderExample() { 15 $viewer = $this->getRequest()->getUser(); 16 17 $content = pht(<<<EOCONTENT 18 This is some **remarkup text** using ~~exactly one style~~ //various styles//. 19 20 - Fruit 21 - Apple 22 - Banana 23 - Cherry 24 - Vegetables 25 1. Carrot 26 2. Celery 27 28 NOTE: This is a note. 29 30 (NOTE) This is also a note. 31 32 WARNING: This is a warning. 33 34 (WARNING) This is also a warning. 35 36 IMPORTANT: This is not really important. 37 38 (IMPORTANT) This isn't important either. 39 40 EOCONTENT 41 ); 42 43 $remarkup = PhabricatorMarkupEngine::renderOneObject( 44 id(new PhabricatorMarkupOneOff())->setContent($content), 45 'default', 46 $viewer); 47 48 $frame = id(new PHUIBoxView()) 49 ->addPadding(PHUI::PADDING_LARGE) 50 ->appendChild($remarkup); 51 52 return id(new PHUIObjectBoxView()) 53 ->setHeaderText(pht('Remarkup Example')) 54 ->appendChild($frame); 55 } 56 57 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |