public function EntityOwnerTrait::getOwnerId in CRM Core 8
Same name and namespace in other branches
- 8.2 src/EntityOwnerTrait.php \Drupal\crm_core\EntityOwnerTrait::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.
File
- src/
EntityOwnerTrait.php, line 73
Class
- EntityOwnerTrait
- Trait implementing the various methods defined in EntityOwnerInterface.
Namespace
Drupal\crm_coreCode
public function getOwnerId() {
return $this
->get('uid')->target_id;
}