You are here

public static function AccessToken::getCurrentUserId in Access unpublished 8

Default value callback for 'uid' base field definition.

Return value

array An array of default values.

See also

::baseFieldDefinitions()

File

src/Entity/AccessToken.php, line 272

Class

AccessToken
Defines the Access token entity.

Namespace

Drupal\access_unpublished\Entity

Code

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