You are here

public function Accepted::getOwnerId in Legal 2.0.x

Same name and namespace in other branches
  1. 8 src/Entity/Accepted.php \Drupal\legal\Entity\Accepted::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/Accepted.php, line 64

Class

Accepted
Defines the Legal Terms & Conditions accepted entity.

Namespace

Drupal\legal\Entity

Code

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