answer = $answer; return $this; } public function setHandles($handles) { $this->handles = $handles; return $this; } public function setUser(PhabricatorUser $user) { $this->user = $user; return $this; } private static function abbreviate($w) { return phutil_utf8_shorten($w, 60); } public function render() { require_celerity_resource('ponder-feed-view-css'); $user = $this->user; $answer = $this->answer; $question = $answer->getQuestion(); $author_phid = $question->getAuthorPHID(); $handles = $this->handles; $votecount = '
'. phutil_escape_html($answer->getVoteCount()). '
'. 'votes'. '
'. '
'; $title = '

'. phutil_render_tag( 'a', array( "href" => id(new PhutilURI('/Q' . $question->getID())) ->setFragment('A' . $answer->getID()) ), phutil_escape_html('A' . $answer->getID() . ' ' . self::abbreviate($answer->getContent()) ) ). '

'; $rhs = '
'. $title. ''. phutil_escape_html( 'answer to "'. self::abbreviate($question->getTitle()). '" on ' . phabricator_datetime($answer->getDateCreated(), $user) ). ''. '
'; $summary = '
'. $votecount. $rhs. '
'; return $summary; } }