/** * Setup values * values of Answer * * @param Answer $o * * @return object $this */ protected function makeAnswerPost(Answer $o) { d('cp'); $qlink = $o->getUrl(); /** * @todo Translate string * * @var string */ $tpl = '<p>This is my answer to a <a href="%s"><strong>Question</strong></a> on %s</p><br>'; $body = sprintf($tpl, $qlink, $this->Registry->Ini->SITE_NAME); $body .= $o->getBody(); d('body: ' . $body); $body = HtmlString::stringFactory($body); $title = 'My answer to "' . $o->getTitle() . '"'; $this->oEntry->setBody($body)->setTitle($title); return $this; }
/** * * Setup values in $this->oTumblrPost using * values of Answer * * @param Answer $o */ protected function makeAnswerPost(Answer $o) { //d('cp'); $this->oTumblrPost = new TumblrPost(); $qlink = $this->Registry->Ini->SITE_URL . '/q' . $o->getQuestionId() . '/'; /** * @todo Translate string * * @var string */ $tpl = '<p>This is my answer to a <a href="%s"><strong>question</strong></a> on %s</p><br>'; $body = sprintf($tpl, $qlink, $this->Registry->Ini->SITE_NAME); $body .= $o->getBody(); //d('body: '.$body); $title = 'My answer to "' . $o->getTitle() . '"'; $this->oTumblrPost->setBody($body)->setTitle($title); return $this; }