function BatchTestDefinitions::batch8

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/batch_test/src/BatchTestDefinitions.php \Drupal\batch_test\BatchTestDefinitions::batch8()

Batch 8: Throws an exception.

File

core/modules/system/tests/modules/batch_test/src/BatchTestDefinitions.php, line 184

Class

BatchTestDefinitions
Batch definitions for testing batches.

Namespace

Drupal\batch_test

Code

public function batch8() : array {
  $batch_builder = (new BatchBuilder())->addOperation(BatchTestCallbacks::class . ':callback8', [
    FALSE,
  ])
    ->addOperation(BatchTestCallbacks::class . ':callback8', [
    TRUE,
  ]);
  return $batch_builder->toArray() + [
    'batch_test_id' => 'batch8',
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.