// @todo Find a more reliable way to determine if a form element concerns a
// multilingual value.
if (!
isset($ignored_types)) { $ignored_types =
array_flip(['actions', 'value', 'hidden', 'vertical_tabs', 'token', 'details', 'link'
]);
} /** @var \Drupal\Core\Entity\ContentEntityForm $form_object */
$form_object =
$form_state->
getFormObject();
/** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
$entity =
$form_object->
getEntity();
$display_translatability_clue = !
$entity->
isDefaultTranslationAffectedOnly();
$hide_untranslatable_fields =
$entity->
isDefaultTranslationAffectedOnly() && !
$entity->
isDefaultTranslation();
$translation_form =
$form_state->
get(['content_translation', 'translation_form'
]);
$display_warning = FALSE;
// We use field definitions to identify untranslatable field widgets to be
// hidden. Fields that are not involved in translation changes checks should
// not be affected by this logic (the "revision_log" field, for instance).
$field_definitions =
array_diff_key($entity->
getFieldDefinitions(),
array_flip($this->
getFieldsToSkipFromTranslationChangesCheck($entity)));
foreach (Element::
children($element) as $key) { if (!
isset($element[$key]['#type'
])) {