You are here

public function PushNotificationsToken::setOwner in Push Notifications 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/PushNotificationsToken.php, line 121
Contains \Drupal\push_notifications\Entity\PushNotificationsToken.

Class

PushNotificationsToken
Defines the token entity.

Namespace

Drupal\push_notifications\Entity

Code

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