function lingotek_disassociate_all_form_submit in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.admin.inc \lingotek_disassociate_all_form_submit()
- 7.5 lingotek.admin.inc \lingotek_disassociate_all_form_submit()
File
- ./
lingotek.admin.inc, line 2156
Code
function lingotek_disassociate_all_form_submit($form_state, $form) {
$doc_ids = LingotekSync::getAllLocalDocIds();
$api = LingotekApi::instance();
$operations = array();
$remove_from_tms = $form_state['disassociate_all_translations']['confirm']['#value'];
if ($remove_from_tms) {
//disassociate on TMS
lingotek_batch_disassociate_content_worker($api, $doc_ids);
}
//disassociate on CMS
LingotekSync::disassociateAllEntities();
LingotekSync::disassociateAllSets();
drupal_set_message(t('All local translations have been disassociated from Lingotek.'));
}