You are here

public static function Order::getCurrentUserId in Commerce Core 8.2

Default value callback for 'uid' base field definition.

Return value

array An array of default values.

See also

::baseFieldDefinitions()

File

modules/order/src/Entity/Order.php, line 960

Class

Order
Defines the order entity class.

Namespace

Drupal\commerce_order\Entity

Code

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