You are here

public function SmsMessage::setSenderEntity in SMS Framework 8

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

Set the entity who sent the SMS message.

Parameters

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

Return value

$this Return SMS message for chaining.

Overrides SmsMessageInterface::setSenderEntity

1 call to SmsMessage::setSenderEntity()
SmsMessage::setUid in src/Entity/SmsMessage.php
Set the user who created the SMS message.

File

src/Entity/SmsMessage.php, line 371

Class

SmsMessage
Defines the SMS message entity.

Namespace

Drupal\sms\Entity

Code

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