You are here

public function Relation::getOwnerId in Relation 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Relation.php \Drupal\relation\Entity\Relation::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

File

src/Entity/Relation.php, line 136
Contains \Drupal\relation\Entity\Relation.

Class

Relation
Defines relation entity.

Namespace

Drupal\relation\Entity

Code

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