public function Relation::setOwner in Relation 8
Same name and namespace in other branches
- 8.2 src/Entity/Relation.php \Drupal\relation\Entity\Relation::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/ Relation.php, line 151 - Contains \Drupal\relation\Entity\Relation.
Class
- Relation
- Defines relation entity.
Namespace
Drupal\relation\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('uid', $account
->id());
return $this;
}