You are here

public function Relation::getOwnerId in Relation 8.2

Same name and namespace in other branches
  1. 8 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 137

Class

Relation
Defines relation entity.

Namespace

Drupal\relation\Entity

Code

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