You are here

public function EntityOwnerTrait::getOwner in CRM Core 8

Same name and namespace in other branches
  1. 8.2 src/EntityOwnerTrait.php \Drupal\crm_core\EntityOwnerTrait::getOwner()

Returns the entity owner's user entity.

Return value

\Drupal\user\UserInterface The owner user entity.

File

src/EntityOwnerTrait.php, line 49

Class

EntityOwnerTrait
Trait implementing the various methods defined in EntityOwnerInterface.

Namespace

Drupal\crm_core

Code

public function getOwner() {
  return $this
    ->get('uid')->entity;
}