function Workspace::getCurrentUserId
Default value callback for 'uid' base field definition.
Return value
int[] An array containing the ID of the current user.
Deprecated
The ::getCurrentUserId method is deprecated in 8.6.x and will be removed before 9.0.0.
File
-
core/
modules/ workspaces/ src/ Entity/ Workspace.php, line 205
Class
- Workspace
- The workspace entity class.
Namespace
Drupal\workspaces\EntityCode
public static function getCurrentUserId() {
@trigger_error('The ::getCurrentUserId method is deprecated in 8.6.x and will be removed before 9.0.0.', E_USER_DEPRECATED);
return [
\Drupal::currentUser()->id(),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.