function fancy_file_delete_files in Fancy File Delete 8
Same name and namespace in other branches
- 7 fancy_file_delete.module \fancy_file_delete_files()
Normal File Delete Action for hook_action_info.
File
- ./
fancy_file_delete.module, line 84
Code
function fancy_file_delete_files(&$entity, $context) {
// Set entities to batch our way.
$operations = [];
foreach ($entity as $key => $value) {
if ($key == 'fid' || $key == 'path') {
$operations[] = [
'fancy_file_delete_batch',
[
$value,
FALSE,
],
];
}
}
// Send to batch.
_fancy_file_delete_batch_run($operations);
}