You are here

public function Message::getTemplate in Message 8

Get the message template.

Return value

\Drupal\message\MessageTemplateInterface Returns the message object.

Overrides MessageInterface::getTemplate

2 calls to Message::getTemplate()
Message::getText in src/Entity/Message.php
Replace arguments with their placeholders.
Message::save in src/Entity/Message.php
Saves an entity permanently.

File

src/Entity/Message.php, line 84

Class

Message
Defines the Message entity class.

Namespace

Drupal\message\Entity

Code

public function getTemplate() {
  return MessageTemplate::load($this
    ->bundle());
}