function BatchBuilder::setErrorMessage
Same name in other branches
- 8.9.x 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()
- 11.x 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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.