function EntityOwnerInterface::setOwnerId

Same name in other branches
  1. 9 core/modules/user/src/EntityOwnerInterface.php \Drupal\user\EntityOwnerInterface::setOwnerId()
  2. 8.9.x core/modules/user/src/EntityOwnerInterface.php \Drupal\user\EntityOwnerInterface::setOwnerId()
  3. 11.x 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);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.