public function PopupOnLoad::setOwner in Popup On Load 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/ PopupOnLoad.php, line 125
Class
- PopupOnLoad
- Defines the Popup On Load entity.
Namespace
Drupal\popup_onload\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('user_id', $account
->id());
return $this;
}