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()); }
Please login to continue.