function translation_entity_language_configuration_element_submit

Form submission handler for element added with translation_entity_language_configuration_element_process().

Stores the entity translation settings.

See also

translation_entity_language_configuration_element_validate()

1 call to translation_entity_language_configuration_element_submit()
comment_translation_configuration_element_submit in drupal/core/modules/comment/comment.module
Form submission handler for node_type_form().
2 string references to 'translation_entity_language_configuration_element_submit'
translation_entity_language_configuration_element_process in drupal/core/modules/translation_entity/translation_entity.module
Process callback: Expands the language_configuration form element.
VocabularyFormController::actions in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php
Returns an array of supported actions for the current entity form.

File

drupal/core/modules/translation_entity/translation_entity.module, line 708
Allows entities to be translated into different languages.

Code

function translation_entity_language_configuration_element_submit(array $form, array &$form_state) {
  $key = $form_state['translation_entity']['key'];
  $context = $form_state['language'][$key];
  $enabled = $form_state['values'][$key]['translation_entity'];
  if (translation_entity_enabled($context['entity_type'], $context['bundle']) != $enabled) {
    translation_entity_set_config($context['entity_type'], $context['bundle'], 'enabled', $enabled);
    entity_info_cache_clear();
    menu_router_rebuild();
  }
}