function Contact::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

modules/content_entity_example/src/Entity/Contact.php, line 165

Class

Contact
Defines the ContentEntityExample entity.

Namespace

Drupal\content_entity_example\Entity

Code

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