groups[$name] = $items; return $this; } public static function renderCommentContent( PhabricatorInlineCommentInterface $inline, PhutilMarkupEngine $engine) { $inline_content = $inline->getContent(); if (strlen($inline_content)) { $inline_cache = $inline->getCache(); if ($inline_cache) { $inline_content = $inline_cache; } else { $inline_content = $engine->markupText($inline_content); if ($inline->getID()) { $inline->setCache($inline_content); $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); $inline->save(); unset($unguarded); } } } return $inline_content; } public function render() { require_celerity_resource('inline-comment-summary-css'); return $this->renderHeader().$this->renderTable(); } private function renderHeader() { return phutil_render_tag( 'div', array( 'class' => 'phabricator-inline-summary', ), 'Inline Comments'); } private function renderTable() { $rows = array(); foreach ($this->groups as $group => $items) { $has_where = false; foreach ($items as $item) { if (!empty($item['where'])) { $has_where = true; break; } } $cols = $has_where ? 3 : 2; $rows[] = '