File::getOwner

public 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 115

Class

File
Defines the file entity class.

Namespace

Drupal\file\Entity

Code

public function getOwner() {
  return $this->get('uid')->entity;
}
doc_Drupal
2016-10-29 09:13:14
Comments
Leave a Comment

Please login to continue.