You are here

public static function Message::getCurrentUserId in Message 8

Default value callback for 'uid' base field definition.

Return value

array An array of default values.

See also

::baseFieldDefinitions()

File

src/Entity/Message.php, line 398

Class

Message
Defines the Message entity class.

Namespace

Drupal\message\Entity

Code

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