You are here

public static function UnitType::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/UnitType.php, line 296
Contains \Drupal\bat_unit\Entity\UnitType.

Class

UnitType
Defines the Unit type entity.

Namespace

Drupal\bat_unit\Entity

Code

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