function tmgmt_ui_cart_empty_cart_form_submit in Translation Management Tool 7
Custom form submit callback for tmgmt_ui_cart_cart_form().
Related topics
1 string reference to 'tmgmt_ui_cart_empty_cart_form_submit'
- tmgmt_ui_cart_content in ui/
includes/ tmgmt_ui.pages.inc - Form constructor for cart form.
File
- ui/
includes/ tmgmt_ui.pages.inc, line 953 - Provides page callbacks and form functions for the Translation Management Tool User Interface module.
Code
function tmgmt_ui_cart_empty_cart_form_submit($form, &$form_state) {
entity_delete_multiple('tmgmt_job_item', array_keys(tmgmt_ui_cart_get()
->getJobItemsFromCart()));
tmgmt_ui_cart_get()
->emptyCart();
drupal_set_message(t('All job items were removed from the cart.'));
}