You are here

public function Pet::getOwner in Previewable email templates 8.3

Returns the entity owner's user entity.

Return value

\Drupal\user\UserInterface The owner user entity.

Overrides EntityOwnerInterface::getOwner

File

src/Entity/Pet.php, line 488

Class

Pet
Defines the pet entity.

Namespace

Drupal\pet\Entity

Code

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