You are here

function lingotek_get_node_settings_form_submit in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.module \lingotek_get_node_settings_form_submit()
  2. 7.4 lingotek.module \lingotek_get_node_settings_form_submit()
  3. 7.5 lingotek.module \lingotek_get_node_settings_form_submit()
1 string reference to 'lingotek_get_node_settings_form_submit'
lingotek_get_node_settings_form in ./lingotek.module
Display the Lingotek node-settings form

File

./lingotek.module, line 1165

Code

function lingotek_get_node_settings_form_submit($form, $form_state) {
  if (!empty($form_state['nids'])) {
    $nids = $form_state['nids'];
    $entity_type = $form_state['entity_type'];
    foreach ($nids as $nid) {
      $node = lingotek_entity_load_single($entity_type, $nid);
      $node->lingotek = array_replace($node->lingotek, $form_state['values']['lingotek']);
      lingotek_entity_save($node, $entity_type);
    }
    node_types_rebuild();
    menu_rebuild();
  }
}