imageURI = $uri; return $this; } public function setActions(array $actions) { $this->actions = $actions; return $this; } public function setEpoch($epoch) { $this->epoch = $epoch; return $this; } public function setContentSource(PhabricatorContentSource $source) { $this->contentSource = $source; return $this; } public function setAnchor($anchor_name, $anchor_text) { $this->anchorName = $anchor_name; $this->anchorText = $anchor_text; return $this; } public function addClass($class) { $this->classes[] = $class; return $this; } public function setIsPreview($preview) { $this->isPreview = $preview; return $this; } public function render() { if (!$this->user) { throw new Exception("Call setUser() before render()!"); } require_celerity_resource('phabricator-transaction-view-css'); $info = $this->renderTransactionInfo(); $actions = $this->renderTransactionActions(); $style = $this->renderTransactionStyle(); $content = $this->renderTransactionContent(); $classes = phutil_escape_html(implode(' ', $this->classes)); $transaction_id = $this->anchorName ? 'anchor-'.$this->anchorName : null; return phutil_render_tag( 'div', array( 'class' => 'phabricator-transaction-view', 'id' => $transaction_id, 'style' => $style, ), '