public static function BulkDeleteForm::processBatch in Bulk Delete 8
Processes the bulk node deletion.
Parameters
array $nids: Node nid.
array $context: The batch context.
File
- src/
Form/ BulkDeleteForm.php, line 154
Class
- BulkDeleteForm
- BackupDatabaseForm class.
Namespace
Drupal\bulkdelete\FormCode
public static function processBatch(array $nids, array &$context) {
$nodes = Node::loadMultiple($nids);
foreach ($nodes as $node) {
$node
->delete();
}
}