diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Form/TranslatableForm.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Form/TranslatableForm.php index 82eddbe..3eca1c5 100644 --- a/core/modules/translation_entity/lib/Drupal/translation_entity/Form/TranslatableForm.php +++ b/core/modules/translation_entity/lib/Drupal/translation_entity/Form/TranslatableForm.php @@ -79,7 +79,22 @@ public function buildForm(array $form, array &$form_state, $field_name = NULL) { } /** - * {@inheritdoc} + * Form submission handler. + * + * This submit handler maintains consistency between the translatability of an + * entity and the language under which the field data is stored. When a field + * is marked as translatable, all the data in + * $entity->{field_name}[Language::LANGCODE_NOT_SPECIFIED] is moved to + * $entity->{field_name}[$entity_language]. When a field is marked as + * untranslatable the opposite process occurs. Note that marking a field as + * untranslatable will cause all of its translations to be permanently + * removed, with the exception of the one corresponding to the entity + * language. + * + * @param array $form + * An associative array containing the structure of the form. + * @param array $form_state + * An associative array containing the current state of the form. */ public function submitForm(array &$form, array &$form_state) { // This is the current state that we want to reverse.