You are here

public static function OpignoCertificate::getCurrentUserId in Opigno certificate 8

Same name and namespace in other branches
  1. 3.x src/Entity/OpignoCertificate.php \Drupal\opigno_certificate\Entity\OpignoCertificate::getCurrentUserId()

Default value callback for 'uid' base field definition.

Return value

array An array of default values.

See also

::baseFieldDefinitions()

File

src/Entity/OpignoCertificate.php, line 311

Class

OpignoCertificate
Defines the opigno_certificate entity class.

Namespace

Drupal\opigno_certificate\Entity

Code

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