Skip to content
Snippets Groups Projects
Commit f8c1ea38 authored by Theresa Grannum's avatar Theresa Grannum Committed by Adam G-H
Browse files

Issue #3280204 by Theresa.Grannum: Missing documentation on 'addError' and 'add Warning'

parent bdbbb046
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,12 @@ abstract class PreOperationStageEvent extends StageEvent {
/**
* Adds error information to the event.
*
* @param \Drupal\Core\StringTranslation\TranslatableMarkup[] $messages
* The error messages.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $summary
* (optional) The summary of error messages. Only required if there
* is more than one message.
*/
public function addError(array $messages, ?TranslatableMarkup $summary = NULL): void {
$this->results[] = ValidationResult::createError($messages, $summary);
......
......@@ -65,6 +65,12 @@ class ReadinessCheckEvent extends PreOperationStageEvent {
/**
* Adds warning information to the event.
*
* @param \Drupal\Core\StringTranslation\TranslatableMarkup[] $messages
* The warning messages.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $summary
* (optional) The summary of warning messages. Required if there is more
* than one message.
*/
public function addWarning(array $messages, ?TranslatableMarkup $summary = NULL): void {
$this->results[] = ValidationResult::createWarning($messages, $summary);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment