You are here

public function Synonym::setOwner in Search API Synonym 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/Synonym.php, line 156

Class

Synonym
Defines the Synonym entity.

Namespace

Drupal\search_api_synonym\Entity

Code

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