function skinr_skin_delete_multiple in Skinr 7.2
Delete multiple skin configuration objects.
Parameters
$sids: An array of skin configuration IDs.
3 calls to skinr_skin_delete_multiple()
- skinr_context_group_delete_multiple in skinr_context/
skinr_context.module - Delete multiple skin settings group objects.
- skinr_skin_delete in ./
skinr.module - Delete a skin object.
- skinr_ui_multiple_delete_confirm_submit in ./
skinr_ui.admin.inc - Form submission handler for skinr_ui_multiple_delete_confirm().
File
- ./
skinr.module, line 697 - Handles core Skinr functionality.
Code
function skinr_skin_delete_multiple($sids) {
$transaction = db_transaction();
if (!empty($sids)) {
$skins = skinr_skin_load_multiple($sids);
try {
foreach ($skins as $sid => $skin) {
module_invoke_all('skinr_skin_delete', $skin);
}
// Delete after calling hooks so that they can query node tables as needed.
db_delete('skinr_skins')
->condition('sid', $sids, 'IN')
->execute();
} catch (Exception $e) {
$transaction
->rollback();
watchdog_exception('skinr', $e);
throw $e;
}
// Clear the skinr_skin_load_multiple cache.
drupal_static_reset('skinr_skin_load_multiple');
}
}