function FieldTranslationSynchronizer::getFieldSynchronizedProperties

Same name in other branches
  1. 9 core/modules/content_translation/src/FieldTranslationSynchronizer.php \Drupal\content_translation\FieldTranslationSynchronizer::getFieldSynchronizedProperties()
  2. 8.9.x core/modules/content_translation/src/FieldTranslationSynchronizer.php \Drupal\content_translation\FieldTranslationSynchronizer::getFieldSynchronizedProperties()
  3. 11.x core/modules/content_translation/src/FieldTranslationSynchronizer.php \Drupal\content_translation\FieldTranslationSynchronizer::getFieldSynchronizedProperties()

File

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

Class

FieldTranslationSynchronizer
Provides field translation synchronization capabilities.

Namespace

Drupal\content_translation

Code

public function getFieldSynchronizedProperties(FieldDefinitionInterface $field_definition) {
    $properties = [];
    $settings = $this->getFieldSynchronizationSettings($field_definition);
    foreach ($settings as $group => $translatable) {
        if (!$translatable) {
            $field_type_definition = $this->fieldTypeManager
                ->getDefinition($field_definition->getType());
            if (!empty($field_type_definition['column_groups'][$group]['columns'])) {
                $properties = array_merge($properties, $field_type_definition['column_groups'][$group]['columns']);
            }
        }
    }
    return $properties;
}

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