function comment_translation_configuration_element_submit

Form submission handler for node_type_form().

This handles the comment translation settings added by comment_form_node_type_form_alter().

See also

comment_form_node_type_form_alter()

1 string reference to 'comment_translation_configuration_element_submit'
comment_form_node_type_form_alter in drupal/core/modules/comment/comment.module
Implements hook_form_FORM_ID_alter().

File

drupal/core/modules/comment/comment.module, line 1079
Enables users to comment on published content.

Code

function comment_translation_configuration_element_submit($form, &$form_state) {

  // The comment translation settings form element is embedded into the node
  // type form. Hence we need to provide to the regular submit handler a
  // manipulated form state to make it process comment settings instead of node
  // settings.
  $key = 'language_configuration';
  $comment_form_state = array(
    'translation_entity' => array(
      'key' => $key,
    ),
    'language' => array(
      $key => array(
        'entity_type' => 'comment',
        'bundle' => 'comment_node_' . $form['#node_type']->type,
      ),
    ),
    'values' => array(
      $key => array(
        'translation_entity' => $form_state['values']['translation_entity'],
      ),
    ),
  );
  translation_entity_language_configuration_element_submit($form, $comment_form_state);
}