id = $data['id']; } public function processRequest() { $request = $this->getRequest(); $author_phid = $request->getUser()->getPHID(); $handles = id(new PhabricatorObjectHandleData(array($author_phid))) ->loadHandles(); $factory = new DifferentialMarkupEngineFactory(); $engine = $factory->newDifferentialCommentMarkupEngine(); $comment = new DifferentialComment(); $comment->setContent($request->getStr('content')); $comment->setAction($request->getStr('action')); $comment->setAuthorPHID($author_phid); $view = new DifferentialRevisionCommentView(); $view->setComment($comment); $view->setHandles($handles); $view->setMarkupEngine($engine); $view->setPreview(true); return id(new AphrontAjaxResponse()) ->setContent($view->render()); } }