public function Contact::getOwnerId in Examples for Developers 8
Same name and namespace in other branches
- 3.x modules/content_entity_example/src/Entity/Contact.php \Drupal\content_entity_example\Entity\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
- content_entity_example/
src/ Entity/ Contact.php, line 165
Class
- Contact
- Defines the ContentEntityExample entity.
Namespace
Drupal\content_entity_example\EntityCode
public function getOwnerId() {
return $this
->get('user_id')->target_id;
}