You are here

public function RoleWatchdog::setOwner in Role Watchdog 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/RoleWatchdog.php, line 131

Class

RoleWatchdog
Defines the Role Watchdog entity.

Namespace

Drupal\role_watchdog\Entity

Code

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