private function renderComments(array $comments, array $handles) { $viewer = $this->getRequest()->getUser(); $engine = PhabricatorMarkupEngine::newSlowvoteMarkupEngine(); $comment_markup = array(); foreach ($comments as $comment) { $handle = $handles[$comment->getAuthorPHID()]; $markup = $engine->markupText($comment->getCommentText()); require_celerity_resource('phabricator-remarkup-css'); $comment_markup[] = '<tr>' . '<th>' . $handle->renderLink() . '<div class="phabricator-slowvote-datestamp">' . phabricator_datetime($comment->getDateCreated(), $viewer) . '</div>' . '<td>' . '<div class="phabricator-remarkup">' . $markup . '</div>' . '</td>' . '</tr>'; } if ($comment_markup) { $comment_markup = phutil_render_tag('table', array('class' => 'phabricator-slowvote-comments'), implode("\n", $comment_markup)); } else { $comment_markup = null; } return $comment_markup; }