You are here

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

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

Set the entity who will receive the SMS message.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity who will receive the SMS message.

Return value

$this Return SMS message for chaining.

Overrides SmsMessageInterface::setRecipientEntity

File

src/Entity/SmsMessage.php, line 388

Class

SmsMessage
Defines the SMS message entity.

Namespace

Drupal\sms\Entity

Code

public function setRecipientEntity(EntityInterface $entity) {
  $this
    ->set('recipient_entity', $entity);
  return $this;
}