Same name and namespace in other branches
  1. 8.9.x core/modules/user/src/EntityOwnerInterface.php \Drupal\user\EntityOwnerInterface::setOwnerId()
  2. 9 core/modules/user/src/EntityOwnerInterface.php \Drupal\user\EntityOwnerInterface::setOwnerId()

Sets the entity owner's user ID.

Parameters

int $uid: The owner user id.

Return value

$this

1 method overrides EntityOwnerInterface::setOwnerId()
EntityTest::setOwnerId in core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php
Sets the entity owner's user ID.

File

core/modules/user/src/EntityOwnerInterface.php, line 52

Class

EntityOwnerInterface
Defines a common interface for entities that have an owner.

Namespace

Drupal\user

Code

public function setOwnerId($uid);