Node::setOwnerId

public Node::setOwnerId($uid)

Sets the entity owner's user ID.

Parameters

int $uid: The owner user id.

Return value

$this

Overrides EntityOwnerInterface::setOwnerId

File

core/modules/node/src/Entity/Node.php, line 277

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

public function setOwnerId($uid) {
  $this->set('uid', $uid);
  return $this;
}
doc_Drupal
2016-10-29 09:30:24
Comments
Leave a Comment

Please login to continue.