function BatchTestDefinitions::batch0

Batch 0: Does nothing.

File

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

Class

BatchTestDefinitions

Namespace

Drupal\batch_test

Code

public function batch0() : array {
    $batch_test_callbacks = new BatchTestCallbacks();
    $batch_builder = (new BatchBuilder())->setFinishCallback([
        $batch_test_callbacks,
        'finished0',
    ]);
    return $batch_builder->toArray() + [
        'batch_test_id' => 'batch0',
    ];
}

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