function BatchBuilder::toArray
Converts a \Drupal\Core\Batch\Batch object into an array.
Return value
array The array representation of the object.
File
- 
              core/lib/ Drupal/ Core/ Batch/ BatchBuilder.php, line 326 
Class
- BatchBuilder
- Builds an array for a batch process.
Namespace
Drupal\Core\BatchCode
public function toArray() {
  $array = [
    'operations' => $this->operations ?: [],
    'title' => $this->title ?: '',
    'init_message' => $this->initMessage ?: '',
    'progress_message' => $this->progressMessage ?: '',
    'error_message' => $this->errorMessage ?: '',
    'finished' => $this->finished,
    'file' => $this->file,
    'library' => $this->libraries ?: [],
    'url_options' => $this->urlOptions ?: [],
    'progressive' => $this->progressive,
  ];
  if ($this->queue) {
    $array['queue'] = $this->queue;
  }
  return $array;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
