You are here

public static function Unit::getCurrentUserId in Booking and Availability Management Tools for Drupal 8

Default value callback for 'uid' base field definition.

Return value

array An array of default values.

See also

::baseFieldDefinitions()

File

modules/bat_unit/src/Entity/Unit.php, line 332
Contains \Drupal\bat_unit\Entity\Unit.

Class

Unit
Defines the Unit entity.

Namespace

Drupal\bat_unit\Entity

Code

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