You are here

private function PrivateMessageThreadManager::getThread in Private Message 8.2

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

If no thread is defined, load one from the thread members.

Return value

$this

File

src/Service/PrivateMessageThreadManager.php, line 93

Class

PrivateMessageThreadManager
The Private Message generator class.

Namespace

Drupal\private_message\Service

Code

private function getThread() {
  if (is_null($this->thread)) {
    $this->thread = $this->privateMessageService
      ->getThreadForMembers($this->recipients);
  }
  return $this;
}