public function BatchBuilder::setErrorMessage in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Batch/BatchBuilder.php \Drupal\Core\Batch\BatchBuilder::setErrorMessage()
- 10 core/lib/Drupal/Core/Batch/BatchBuilder.php \Drupal\Core\Batch\BatchBuilder::setErrorMessage()
Sets the message to display if an error occurs while processing.
Defaults to 'An error has occurred.'.
Parameters
string|\Drupal\Core\StringTranslation\TranslatableMarkup $message: The text to display.
Return value
$this
File
- core/
lib/ Drupal/ Core/ Batch/ BatchBuilder.php, line 197
Class
- BatchBuilder
- Builds an array for a batch process.
Namespace
Drupal\Core\BatchCode
public function setErrorMessage($message) {
$this->errorMessage = $message;
return $this;
}