protected function ContentTranslationHandler::hasAuthor in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/content_translation/src/ContentTranslationHandler.php \Drupal\content_translation\ContentTranslationHandler::hasAuthor()
 
Checks whether the entity type supports author natively.
Return value
bool TRUE if metadata is natively supported, FALSE otherwise.
1 call to ContentTranslationHandler::hasAuthor()
- ContentTranslationHandler::getFieldDefinitions in core/
modules/ content_translation/ src/ ContentTranslationHandler.php  - Returns a set of field definitions to be used to store metadata items.
 
File
- core/
modules/ content_translation/ src/ ContentTranslationHandler.php, line 177  - Contains \Drupal\content_translation\ContentTranslationHandler.
 
Class
- ContentTranslationHandler
 - Base class for content translation handlers.
 
Namespace
Drupal\content_translationCode
protected function hasAuthor() {
  // Check for field named uid, but only in case the entity implements the
  // EntityOwnerInterface. This helps to exclude cases, where the uid is
  // defined as field name, but is not meant to be an owner field e.g. the
  // User entity.
  return $this->entityType
    ->isSubclassOf('\\Drupal\\user\\EntityOwnerInterface') && $this
    ->checkFieldStorageDefinitionTranslatability('uid');
}