public function ContentDeleteController::getContentDeleteBatch in Delete all 8
Same name and namespace in other branches
- 2.x src/Controller/ContentDeleteController.php \Drupal\delete_all\Controller\ContentDeleteController::getContentDeleteBatch()
File
- src/
Controller/ ContentDeleteController.php, line 49
Class
- ContentDeleteController
- Returns responses for devel module routes.
Namespace
Drupal\delete_all\ControllerCode
public function getContentDeleteBatch($nodes_to_delete = FALSE) {
// Define batch.
$batch = [
'operations' => [
[
'delete_all_content_batch_delete',
[
$nodes_to_delete,
],
],
],
'finished' => 'delete_all_content_batch_delete_finished',
'title' => $this
->t('Deleting Node'),
'init_message' => $this
->t('Node deletion is starting.'),
'progress_message' => $this
->t('Deleting Node...'),
'error_message' => $this
->t('Node deletion has encountered an error.'),
];
return $batch;
}