You are here

public function MassContactMessage::setOwner in Mass Contact 8

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/MassContactMessage.php, line 61

Class

MassContactMessage
The mass contact message entity for archiving messages.

Namespace

Drupal\mass_contact\Entity

Code

public function setOwner(UserInterface $account) {
  $this
    ->set('uid', $account
    ->id());
  return $this;
}