diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index e24d62c..d8904e9 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -143,36 +143,6 @@ function content_translation_entity_bundle_info_alter(&$bundles) { } /** - * Implements hook_entity_bundle_field_info_alter(). - * - * @todo Remove this when any field supports per-bundle configurable overrides. - * See https://drupal.org/node/2224761. - */ -function content_translation_entity_bundle_field_info_alter(&$fields, EntityTypeInterface $entity_type, $bundle) { - $settings = content_translation_get_config($entity_type->id(), $bundle, 'fields'); - if (!empty($settings)) { - $base_field_definitions = \Drupal::entityManager()->getBaseFieldDefinitions($entity_type->id()); - foreach ($settings as $name => $translatable) { - // Skip storable field definitions as those are supposed to have already - // been changed. - if (!isset($fields[$name]) || !$fields[$name] instanceof FieldConfigInterface) { - // If we do not have a bundle definition for the current field and we - // have to override its translatability, we need to instantiate a new - // bundle field definition from the base one. - if (!isset($fields[$name]) && isset($base_field_definitions[$name]) && $base_field_definitions[$name]->isTranslatable() != $translatable) { - $fields[$name] = clone $base_field_definitions[$name]; - } - if (isset($fields[$name])) { - $fields[$name]->setTranslatable((bool) $translatable); - } - } - } - } -} - -/** -======= ->>>>>>> 8.0.x * Implements hook_field_info_alter(). * * Content translation extends the @FieldType annotation with following key: