You are here

public static function ContentTranslationHandler::getDefaultOwnerId in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/content_translation/src/ContentTranslationHandler.php \Drupal\content_translation\ContentTranslationHandler::getDefaultOwnerId()

Default value callback for the owner base field definition.

Return value

int The user ID.

File

core/modules/content_translation/src/ContentTranslationHandler.php, line 715
Contains \Drupal\content_translation\ContentTranslationHandler.

Class

ContentTranslationHandler
Base class for content translation handlers.

Namespace

Drupal\content_translation

Code

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