You are here

protected function FieldTranslationSynchronizer::getFieldSynchronizationSettings in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/content_translation/src/FieldTranslationSynchronizer.php \Drupal\content_translation\FieldTranslationSynchronizer::getFieldSynchronizationSettings()

Returns the synchronization settings for the specified field.

Parameters

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: A field definition.

Return value

string[] An array of synchronized field property names.

2 calls to FieldTranslationSynchronizer::getFieldSynchronizationSettings()
FieldTranslationSynchronizer::getFieldSynchronizedProperties in core/modules/content_translation/src/FieldTranslationSynchronizer.php
Returns the synchronized properties for the specified field definition.
FieldTranslationSynchronizer::synchronizeFields in core/modules/content_translation/src/FieldTranslationSynchronizer.php
Performs field column synchronization on the given entity.

File

core/modules/content_translation/src/FieldTranslationSynchronizer.php, line 76

Class

FieldTranslationSynchronizer
Provides field translation synchronization capabilities.

Namespace

Drupal\content_translation

Code

protected function getFieldSynchronizationSettings(FieldDefinitionInterface $field_definition) {
  if ($field_definition instanceof ThirdPartySettingsInterface && $field_definition
    ->isTranslatable()) {
    return $field_definition
      ->getThirdPartySetting('content_translation', 'translation_sync', []);
  }
  return [];
}