domain->getLdhName(); $this ->subject("Success: Domain Ordered $ldhName!") ->content("Domain name $ldhName has just been purchased. The API provider did not return an error.") ->importance(Notification::IMPORTANCE_HIGH); return ChatMessage::fromNotification($this); } public function asPushMessage(?RecipientInterface $recipient = null, ?string $transport = null): ?PushMessage { $ldhName = $this->domain->getLdhName(); $this ->subject("Success: Domain Ordered $ldhName!") ->content("Domain name $ldhName has just been purchased. The API provider did not return an error.") ->importance(Notification::IMPORTANCE_HIGH); return PushMessage::fromNotification($this); } public function asEmailMessage(EmailRecipientInterface $recipient): EmailMessage { $ldhName = $this->domain->getLdhName(); return new EmailMessage((new TemplatedEmail()) ->from($this->sender) ->to($recipient->getEmail()) ->priority(Email::PRIORITY_HIGHEST) ->subject("Domain name $ldhName has just been purchased") ->htmlTemplate('emails/success/domain_ordered.html.twig') ->locale('en') ->context([ 'domain' => $this->domain, 'provider' => $this->connector->getProvider()->value, ])); } }