function EntityOwnerInterface::setOwner
Same name in other branches
- 9 core/modules/user/src/EntityOwnerInterface.php \Drupal\user\EntityOwnerInterface::setOwner()
- 8.9.x core/modules/user/src/EntityOwnerInterface.php \Drupal\user\EntityOwnerInterface::setOwner()
- 11.x core/modules/user/src/EntityOwnerInterface.php \Drupal\user\EntityOwnerInterface::setOwner()
Sets the entity owner's user entity.
Parameters
\Drupal\user\UserInterface $account: The owner user entity.
Return value
$this
1 method overrides EntityOwnerInterface::setOwner()
- EntityTest::setOwner in core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTest.php - Sets the entity owner's user entity.
File
-
core/
modules/ user/ src/ EntityOwnerInterface.php, line 33
Class
- EntityOwnerInterface
- Defines a common interface for entities that have an owner.
Namespace
Drupal\userCode
public function setOwner(UserInterface $account);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.