title = $title; } /** * Sets the author * * @param string $author */ public function setAuthor($author) { $this->author = $author; } /** * {@inheritdoc} */ public function getSubject() { if (!$this->title) { throw new LogicException('You must set an title before calling getMessage'); } return sprintf(_('Nouvelle publication : %s'), $this->title); } /** * {@inheritdoc} */ public function getMessage() { if (!$this->author) { throw new LogicException('You must set an author before calling getMessage'); } if (!$this->title) { throw new LogicException('You must set an title before calling getMessage'); } return sprintf('%s vient de publier %s', $this->author, $this->title); } /** * {@inheritdoc} */ public function getButtonText() { return sprintf(_('View on %s'), $this->getPhraseanetTitle()); } /** * {@inheritdoc} */ public function getButtonURL() { return $this->url; } }