You are here

public function Node::getOwnerId in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::getOwnerId()

Returns the entity owner's user ID.

Return value

int|null The owner user ID, or NULL in case the user ID field has not been set on the entity.

Overrides EntityOwnerInterface::getOwnerId

1 call to Node::getOwnerId()
Node::preSave in core/modules/node/src/Entity/Node.php
Acts on an entity before the presave hook is invoked.

File

core/modules/node/src/Entity/Node.php, line 271
Contains \Drupal\node\Entity\Node.

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

public function getOwnerId() {
  return $this
    ->getEntityKey('uid');
}