function FieldTranslationSynchronizer::getFieldSynchronizationSettings

Same name in other branches
  1. 9 core/modules/content_translation/src/FieldTranslationSynchronizer.php \Drupal\content_translation\FieldTranslationSynchronizer::getFieldSynchronizationSettings()
  2. 8.9.x core/modules/content_translation/src/FieldTranslationSynchronizer.php \Drupal\content_translation\FieldTranslationSynchronizer::getFieldSynchronizationSettings()
  3. 11.x 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
FieldTranslationSynchronizer::synchronizeFields in core/modules/content_translation/src/FieldTranslationSynchronizer.php

File

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

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 [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.