Returns the translated message.
TranslatableMarkup The message.
Overrides MessageInterface::getMessage
public function getMessage() {
$text = $this->message->value;
if ($this->variables
->first() && $this->variables
->first()
->toArray()) {
return new TranslatableMarkup($text, $this->variables
->first()
->toArray());
}
else {
return new TranslatableMarkup($text);
}
}