[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 abstract class PhabricatorInlineCommentPreviewController 4 extends PhabricatorController { 5 6 abstract protected function loadInlineComments(); 7 8 public function processRequest() { 9 $request = $this->getRequest(); 10 $user = $request->getUser(); 11 12 $inlines = $this->loadInlineComments(); 13 assert_instances_of($inlines, 'PhabricatorInlineCommentInterface'); 14 15 $engine = new PhabricatorMarkupEngine(); 16 $engine->setViewer($user); 17 foreach ($inlines as $inline) { 18 $engine->addObject( 19 $inline, 20 PhabricatorInlineCommentInterface::MARKUP_FIELD_BODY); 21 } 22 $engine->process(); 23 24 $phids = array($user->getPHID()); 25 $handles = $this->loadViewerHandles($phids); 26 27 $views = array(); 28 foreach ($inlines as $inline) { 29 $view = new DifferentialInlineCommentView(); 30 $view->setInlineComment($inline); 31 $view->setMarkupEngine($engine); 32 $view->setHandles($handles); 33 $view->setEditable(false); 34 $view->setPreview(true); 35 $views[] = $view->render(); 36 } 37 $views = phutil_implode_html("\n", $views); 38 39 return id(new AphrontAjaxResponse()) 40 ->setContent($views); 41 } 42 }
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 |