Node::getCurrentUserId

public static Node::getCurrentUserId()

Default value callback for 'uid' base field definition.

Return value

array An array of default values.

See also

::baseFieldDefinitions()

File

core/modules/node/src/Entity/Node.php, line 512

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

public static function getCurrentUserId() {
  return array(\Drupal::currentUser()->id());
}
doc_Drupal
2016-10-29 09:30:20
Comments
Leave a Comment

Please login to continue.