You are here

public function Contact::setOwnerId in Examples for Developers 3.x

Same name and namespace in other branches
  1. 8 content_entity_example/src/Entity/Contact.php \Drupal\content_entity_example\Entity\Contact::setOwnerId()

Sets the entity owner's user ID.

Parameters

int $uid: The owner user id.

Return value

$this

Overrides EntityOwnerInterface::setOwnerId

File

modules/content_entity_example/src/Entity/Contact.php, line 172

Class

Contact
Defines the ContentEntityExample entity.

Namespace

Drupal\content_entity_example\Entity

Code

public function setOwnerId($uid) {
  $this
    ->set('user_id', $uid);
  return $this;
}