public function EntityOwnerTrait::getOwner in Profile 8
2 calls to EntityOwnerTrait::getOwner()
- Profile::postSave in src/
Entity/ Profile.php - Acts on a saved entity before the insert or update hook is invoked.
- Profile::preSave in src/
Entity/ Profile.php - Acts on an entity before the presave hook is invoked.
File
- src/
EntityOwnerTrait.php, line 70
Class
- EntityOwnerTrait
- Provides a trait for entities that have an owner.
Namespace
Drupal\profileCode
public function getOwner() {
$key = $this
->getEntityType()
->getKey('owner');
return $this
->get($key)->entity;
}