You are here

public function FlaggingCollection::setOwner in Flag Lists 4.0.x

Same name and namespace in other branches
  1. 8 src/Entity/FlaggingCollection.php \Drupal\flag_lists\Entity\FlaggingCollection::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/FlaggingCollection.php, line 291

Class

FlaggingCollection
Defines the Flagging collection entity.

Namespace

Drupal\flag_lists\Entity

Code

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