You are here

protected function ContentTranslationHandler::checkFieldStorageDefinitionTranslatability in Drupal 9

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

Checks the field storage definition for translatability support.

Checks whether the given field is defined in the field storage definitions and if its definition specifies it as translatable.

Parameters

string $field_name: The name of the field.

Return value

bool TRUE if translatable field storage definition exists, FALSE otherwise.

4 calls to ContentTranslationHandler::checkFieldStorageDefinitionTranslatability()
ContentTranslationHandler::hasAuthor in core/modules/content_translation/src/ContentTranslationHandler.php
Checks whether the entity type supports author natively.
ContentTranslationHandler::hasChangedTime in core/modules/content_translation/src/ContentTranslationHandler.php
Checks whether the entity type supports modification time natively.
ContentTranslationHandler::hasCreatedTime in core/modules/content_translation/src/ContentTranslationHandler.php
Checks whether the entity type supports creation time natively.
ContentTranslationHandler::hasPublishedStatus in core/modules/content_translation/src/ContentTranslationHandler.php
Checks whether the entity type supports published status natively.

File

core/modules/content_translation/src/ContentTranslationHandler.php, line 268

Class

ContentTranslationHandler
Base class for content translation handlers.

Namespace

Drupal\content_translation

Code

protected function checkFieldStorageDefinitionTranslatability($field_name) {
  return array_key_exists($field_name, $this->fieldStorageDefinitions) && $this->fieldStorageDefinitions[$field_name]
    ->isTranslatable();
}