function lingotek_update_marked_items_finished in Lingotek Translation 7.7
2 string references to 'lingotek_update_marked_items_finished'
- lingotek_config_mark_items in ./lingotek.config.inc
- lingotek_grid_action_submit in ./lingotek.bulk_grid.inc
- Submit function for The Grid's actions
The action corresponds to the key of the option selected
Often redirects to batch operations or to other pages entirely
File
- ./lingotek.batch.inc, line 367
- Central location for batch create functions, before control is handed off to individual batch command files.
Code
function lingotek_update_marked_items_finished($success, $results) {
if (isset($results['entity_type']) && $results['entity_type'] === 'config') {
$message = format_plural($results['marked'], t('1 config item has been marked.'), t('@num config items have been marked.', array(
'@num' => (int) $results['marked'],
)));
}
else {
$message = format_plural($results['marked'], t('1 entity has been marked.'), t('@num entities have been marked.', array(
'@num' => (int) $results['marked'],
)));
}
if ($success) {
drupal_set_message(filter_xss($message), 'status');
}
else {
$message = format_plural($results['marked'], t('Marking 1 entity has failed.'), t('Marking @num entities has failed.', array(
'@num' => (int) $results['marked'],
)));
drupal_set_message(filter_xss($message), 'error');
}
}