function BatchBuilder::setFinishCallback

Same name in other branches
  1. 9 core/lib/Drupal/Core/Batch/BatchBuilder.php \Drupal\Core\Batch\BatchBuilder::setFinishCallback()
  2. 10 core/lib/Drupal/Core/Batch/BatchBuilder.php \Drupal\Core\Batch\BatchBuilder::setFinishCallback()
  3. 11.x core/lib/Drupal/Core/Batch/BatchBuilder.php \Drupal\Core\Batch\BatchBuilder::setFinishCallback()

Sets the finished callback.

This callback will be executed if the batch process is done.

Parameters

callable $callback: The callback.

Return value

$this

File

core/lib/Drupal/Core/Batch/BatchBuilder.php, line 146

Class

BatchBuilder
Builds an array for a batch process.

Namespace

Drupal\Core\Batch

Code

public function setFinishCallback(callable $callback) {
    $this->finished = $callback;
    return $this;
}

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