You are here

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\Form

Code

public static function processBatch(array $nids, array &$context) {
  $nodes = Node::loadMultiple($nids);
  foreach ($nodes as $node) {
    $node
      ->delete();
  }
}