public function PrivateMessage::setOwner in Private Message 8.2
Same name and namespace in other branches
- 8 src/Entity/PrivateMessage.php \Drupal\private_message\Entity\PrivateMessage::setOwner()
Sets the entity owner's user entity.
Parameters
\Drupal\user\UserInterface $account: The owner user entity.
Return value
$this
Overrides EntityOwnerInterface::setOwner
File
- src/
Entity/ PrivateMessage.php, line 86
Class
- PrivateMessage
- Thee Private Message entity definition.
Namespace
Drupal\private_message\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('owner', $account
->id());
return $this;
}