You are here

function lingotek_disassociate_all_translations in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.5 lingotek.admin.inc \lingotek_disassociate_all_translations()
  2. 7.6 lingotek.admin.inc \lingotek_disassociate_all_translations()
1 string reference to 'lingotek_disassociate_all_translations'
lingotek_menu in ./lingotek.module
Implements hook_menu().

File

./lingotek.admin.inc, line 2484

Code

function lingotek_disassociate_all_translations($entity_type = 'node', $entity_ids = array(), $extra = "") {
  ctools_include('node.pages', 'node', '');
  ctools_include('modal');
  ctools_include('ajax');
  $entity_ids = !is_array($entity_ids) ? explode(',', $entity_ids) : $entity_ids;
  $form_state = array(
    'ajax' => TRUE,
    'entity_ids' => $entity_ids,
    'entity_type' => $entity_type,
  );
  $output = ctools_modal_form_wrapper('lingotek_disassociate_all_form', $form_state);
  if (!empty($form_state['executed'])) {
    $commands = array();
    $commands[] = ctools_modal_command_dismiss();
    $commands[] = ctools_ajax_command_reload();
    print ajax_render($commands);
    drupal_exit();
  }
  print ajax_render($output);
}