public function EckEntity::getOwner in Entity Construction Kit (ECK) 8
Returns the entity owner's user entity.
Return value
\Drupal\user\UserInterface The owner user entity.
Overrides EntityOwnerInterface::getOwner
1 call to EckEntity::getOwner()
- EckEntity::getOwnerId in src/
Entity/ EckEntity.php - Returns the entity owner's user ID.
File
- src/
Entity/ EckEntity.php, line 50
Class
- EckEntity
- Defines the ECK entity.
Namespace
Drupal\eck\EntityCode
public function getOwner() {
if ($this
->hasField('uid')) {
return $this
->get('uid')->entity;
}
return NULL;
}