function BatchBuilder::__construct

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

Sets the default values for the batch builder.

File

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

Class

BatchBuilder
Builds an array for a batch process.

Namespace

Drupal\Core\Batch

Code

public function __construct() {
    $this->title = new TranslatableMarkup('Processing');
    $this->initMessage = new TranslatableMarkup('Initializing.');
    $this->progressMessage = new TranslatableMarkup('Completed @current of @total.');
    $this->errorMessage = new TranslatableMarkup('An error has occurred.');
}

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