You are here

public static function CalendarEvent::getCurrentUserId in Opigno calendar event 3.x

Same name and namespace in other branches
  1. 8 src/Entity/CalendarEvent.php \Drupal\opigno_calendar_event\Entity\CalendarEvent::getCurrentUserId()

Default value callback for 'uid' base field definition.

Return value

array An array of default values.

See also

::baseFieldDefinitions()

File

src/Entity/CalendarEvent.php, line 318

Class

CalendarEvent
Defines the "Calendar event" entity class.

Namespace

Drupal\opigno_calendar_event\Entity

Code

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