1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-04-06 01:18:25 +02:00
phorge-phorge/src/applications/phame/controller/post/PhamePostPreviewController.php
2013-02-13 14:51:18 -08:00

30 lines
654 B
PHP

<?php
/**
* @group phame
*/
final class PhamePostPreviewController
extends PhameController {
protected function getSideNavFilter() {
return null;
}
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$body = $request->getStr('body');
$post = id(new PhamePost())
->setBody($body);
$content = PhabricatorMarkupEngine::renderOneObject(
$post,
PhamePost::MARKUP_FIELD_BODY,
$user);
$content = hsprintf('<div class="phabricator-remarkup">%s</div>', $content);
return id(new AphrontAjaxResponse())->setContent($content);
}
}