Node::getOwner

public Node::getOwner()

Returns the entity owner's user entity.

Return value

\Drupal\user\UserInterface The owner user entity.

Overrides EntityOwnerInterface::getOwner

File

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

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

public function getOwner() {
  return $this->get('uid')->entity;
}
doc_Drupal
2016-10-29 09:30:20
Comments
Leave a Comment

Please login to continue.