You are here

public function SmsMessage::getRecipientEntity in SMS Framework 2.x

Same name and namespace in other branches
  1. 8 src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::getRecipientEntity()
  2. 2.1.x src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::getRecipientEntity()

Gets the entity who will receive the SMS message.

Return value

\Drupal\Core\Entity\EntityInterface|null The entity who will receive the SMS message, or NULL if it is missing.

Overrides SmsMessageInterface::getRecipientEntity

File

src/Entity/SmsMessage.php, line 381

Class

SmsMessage
Defines the SMS message entity.

Namespace

Drupal\sms\Entity

Code

public function getRecipientEntity() {
  return $this
    ->get('recipient_entity')->entity;
}