quantity = $quantity; } /** * Sets the user that has denied the some of the order * * @param User $deliverer */ public function setDeliverer(User $deliverer) { $this->deliverer = $deliverer; } /** * {@inheritdoc} */ public function getSubject() { return $this->app->trans('push::mail:: Refus d\'elements de votre commande'); } /** * {@inheritdoc} */ public function getMessage() { if (!$this->deliverer instanceof User) { throw new LogicException('You must set a deliverer before calling getMessage()'); } if (null === $this->quantity) { throw new LogicException('You must set a deliverer before calling getMessage()'); } return $this->app->trans('%user% a refuse %quantity% elements de votre commande', [ '%user%' => $this->deliverer->getDisplayName(), '%quantity%' => $this->quantity, ]); } /** * {@inheritdoc} */ public function getButtonText() { return $this->app->trans('See my order'); } /** * {@inheritdoc} */ public function getButtonURL() { return $this->app->url('prod'); } }