public function PushNotification::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/ PushNotification.php, line 164 - Contains Drupal\push_notifications\Entity\PushNotification.
Class
- PushNotification
- Defines the push_notification entity.
Namespace
Drupal\push_notifications\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('user_id', $account
->id());
return $this;
}