You are here

public function CacheflushEntity::setOwner in CacheFlush 8

Sets the entity owner's user entity.

Parameters

\Drupal\user\UserInterface $account: The owner user entity.

Return value

$this

Overrides EntityOwnerInterface::setOwner

File

modules/cacheflush_entity/src/Entity/CacheflushEntity.php, line 121

Class

CacheflushEntity
Defines the Cacheflush entity.

Namespace

Drupal\cacheflush_entity\Entity

Code

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