public function SmsMessage::getUid in SMS Framework 8
Same name in this branch
- 8 src/Message/SmsMessage.php \Drupal\sms\Message\SmsMessage::getUid()
- 8 src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::getUid()
Same name and namespace in other branches
- 2.x src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::getUid()
- 2.1.x src/Entity/SmsMessage.php \Drupal\sms\Entity\SmsMessage::getUid()
Gets the user who created the SMS message.
Return value
int|null The ID of the user who created the message. Or NULL if no user entity is associated as the sender.
Overrides SmsMessageInterface::getUid
File
- src/
Entity/ SmsMessage.php, line 282
Class
- SmsMessage
- Defines the SMS message entity.
Namespace
Drupal\sms\EntityCode
public function getUid() {
$sender = $this
->getSenderEntity();
return $sender instanceof UserInterface ? $sender
->id() : NULL;
}