You are here

public function Comment::setOwnerId in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::setOwnerId()

Sets the entity owner's user ID.

Parameters

int $uid: The owner user id.

Return value

$this

Overrides EntityOwnerInterface::setOwnerId

File

core/modules/comment/src/Entity/Comment.php, line 564
Contains \Drupal\comment\Entity\Comment.

Class

Comment
Defines the comment entity class.

Namespace

Drupal\comment\Entity

Code

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