public function EckEntity::setOwner in Entity Construction Kit (ECK) 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/ EckEntity.php, line 89
Class
- EckEntity
- Defines the ECK entity.
Namespace
Drupal\eck\EntityCode
public function setOwner(UserInterface $account) {
$this
->setOwnerId($account
->id());
return $this;
}