You are here

public function File::getOwner in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/file/src/Entity/File.php \Drupal\file\Entity\File::getOwner()

Returns the entity owner's user entity.

Return value

\Drupal\user\UserInterface The owner user entity.

Overrides EntityOwnerInterface::getOwner

File

core/modules/file/src/Entity/File.php, line 116
Contains \Drupal\file\Entity\File.

Class

File
Defines the file entity class.

Namespace

Drupal\file\Entity

Code

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