You are here

public function CertificateTestEntity::getOwnerId in Certificate 4.x

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

modules/certificate_test/src/Entity/CertificateTestEntity.php, line 113

Class

CertificateTestEntity
Defines the test entity class.

Namespace

Drupal\certificate_test\Entity

Code

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