public function EntityTest::setOwnerId in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php \Drupal\entity_test\Entity\EntityTest::setOwnerId()
- 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php \Drupal\entity_test\Entity\EntityTest::setOwnerId()
Sets the entity owner's user ID.
Parameters
int $uid: The owner user id.
Return value
$this
Overrides EntityOwnerInterface::setOwnerId
File
- core/
modules/ system/ tests/ modules/ entity_test/ src/ Entity/ EntityTest.php, line 131
Class
- EntityTest
- Defines the test entity class.
Namespace
Drupal\entity_test\EntityCode
public function setOwnerId($uid) {
$this
->set('user_id', $uid);
return $this;
}