You are here

public function Message::__toString in Message 8

Convert message contents to a string.

Return value

string The message contents.

Overrides MessageInterface::__toString

File

src/Entity/Message.php, line 379

Class

Message
Defines the Message entity class.

Namespace

Drupal\message\Entity

Code

public function __toString() {
  return trim(implode("\n", $this
    ->getText()));
}