function entity_translation_unified_form_form_node_type_form_submit in Entity Translation Unified Form 8
Same name and namespace in other branches
- 7 entity_translation_unified_form.module \entity_translation_unified_form_form_node_type_form_submit()
Submit handler. Sets content type-specific variable that is used to determine whether or not the content type may used unified forms.
1 string reference to 'entity_translation_unified_form_form_node_type_form_submit'
File
- ./
entity_translation_unified_form.module, line 154
Code
function entity_translation_unified_form_form_node_type_form_submit(&$form, FormStateInterface $form_state) {
$entity_type_id = 'node';
$bundle = $form_state
->getValues()['type'];
$enabled = $form_state
->getValues()['entity_translation_unified_form_enable'];
entity_translation_unified_form_set_bundle_enabled($entity_type_id, $bundle, $enabled);
$enabled = $form_state
->getValues()['entity_translation_unified_form_sbs_enable'];
entity_translation_unified_form_set_sbs_enabled($entity_type_id, $bundle, $enabled);
$enabled = $form_state
->getValues()['entity_translation_unified_form_moderation_sync_disable'];
entity_translation_unified_form_set_moderation_sync_disabled($entity_type_id, $bundle, $enabled);
$enabled = $form_state
->getValues()['entity_translation_unified_form_translate_labels'];
entity_translation_unified_form_set_translate_labels_enabled($entity_type_id, $bundle, $enabled);
}