You are here

private function PrivateMessageThreadManager::addMessage in Private Message 8.2

Same name and namespace in other branches
  1. 8 src/Service/PrivateMessageThreadManager.php \Drupal\private_message\Service\PrivateMessageThreadManager::addMessage()

Add the new message to the thread.

Return value

$this

File

src/Service/PrivateMessageThreadManager.php, line 106

Class

PrivateMessageThreadManager
The Private Message generator class.

Namespace

Drupal\private_message\Service

Code

private function addMessage() {
  $this->thread
    ->addMessage($this->message);
  $this->thread
    ->save();
  return $this;
}