You are here

protected function LingotekContentTranslationHandler::checkFieldStorageDefinitionTranslatability in Lingotek Translation 8

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.

2 calls to LingotekContentTranslationHandler::checkFieldStorageDefinitionTranslatability()
LingotekContentTranslationHandler::hasChangedTime in src/LingotekContentTranslationHandler.php
Checks whether the entity type supports modification time natively.
LingotekContentTranslationHandler::hasCreatedTime in src/LingotekContentTranslationHandler.php
Checks whether the entity type supports creation time natively.

File

src/LingotekContentTranslationHandler.php, line 160
Contains \Drupal\content_translation\ContentTranslationHandler.

Class

LingotekContentTranslationHandler

Namespace

Drupal\lingotek

Code

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