You are here

public static function Transaction::getCurrentUserId in Transaction 8

Default value callback for 'uid' base field definition.

Return value

array An array of default values.

See also

::baseFieldDefinitions()

File

src/Entity/Transaction.php, line 244

Class

Transaction
Provides the transaction content entity.

Namespace

Drupal\transaction\Entity

Code

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