You are here

public function Workspace::setOwner in Opigno Moxtra 3.x

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

Class

Workspace
Defines the Workspace entity.

Namespace

Drupal\opigno_moxtra\Entity

Code

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