You are here

public function ScheduledUpdate::setOwner in Scheduled Updates 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/ScheduledUpdate.php, line 123
Contains \Drupal\scheduled_updates\Entity\ScheduledUpdate.

Class

ScheduledUpdate
Defines the Scheduled update entity.

Namespace

Drupal\scheduled_updates\Entity

Code

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