You are here

public static function Media::getCurrentUserId in Media entity 8

Default value callback for 'uid' base field definition.

Return value

array An array of default values.

See also

::baseFieldDefinitions()

File

src/Entity/Media.php, line 423

Class

Media
Defines the media entity class.

Namespace

Drupal\media_entity\Entity

Code

public static function getCurrentUserId() {
  return [
    \Drupal::currentUser()
      ->id(),
  ];
}