You are here

public static function Event::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_event/src/Entity/Event.php, line 487
Contains \Drupal\bat_event\Entity\Event.

Class

Event
Defines the Event entity.

Namespace

Drupal\bat_event\Entity

Code

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