You are here

public function FlagListItem::setOwner in Flag Lists 8

Same name and namespace in other branches
  1. 4.0.x src/Entity/FlagListItem.php \Drupal\flag_lists\Entity\FlagListItem::setOwner()

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/FlagListItem.php, line 131

Class

FlagListItem
Defines the Flag list item entity.

Namespace

Drupal\flag_lists\Entity

Code

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