title = $title; } /** * Sets the user that finished validation * * @param User $user */ public function setUser(User $user) { $this->user = $user; } /** * {@inheritdoc} */ public function getSubject() { if (!$this->user) { throw new LogicException('You must set an user before calling getSubject'); } if (!$this->title) { throw new LogicException('You must set an title before calling getSubject'); } return $this->app->trans('push::mail:: Rapport de validation de %user% pour %title%', [ '%user%' => $this->user->getDisplayName(), '%title%' => $this->title, ]); } /** * {@inheritdoc} */ public function getMessage() { if (!$this->user) { throw new LogicException('You must set an user before calling getMessage'); } return $this->app->trans('%user% has just sent its validation report, you can now see it', [ '%user%' => $this->user->getDisplayName(), ]); } /** * {@inheritdoc} */ public function getButtonText() { return $this->app->trans('See validation results'); } /** * {@inheritdoc} */ public function getButtonURL() { return $this->url; } }