You are here

public static function Poll::getCurrentUserId in Poll 8

Default value callback for 'uid' base field definition.

Return value

array An array of default values.

See also

::baseFieldDefinitions()

File

src/Entity/Poll.php, line 366

Class

Poll
Defines the poll entity class.

Namespace

Drupal\poll\Entity

Code

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