function ValidationResult::createWarning

Creates a warning ValidationResult object.

Parameters

\Drupal\Core\StringTranslation\TranslatableMarkup[] $messages: The error messages.

\Drupal\Core\StringTranslation\TranslatableMarkup|null $summary: The errors summary.

Return value

static

8 calls to ValidationResult::createWarning()
DirectWriteTest::testSiteNotSandboxedIfDirectWriteGloballyEnabled in core/modules/package_manager/tests/src/Kernel/DirectWriteTest.php
Tests direct-write mode when globally enabled.
PhpExtensionsValidatorTest::providerPhpExtensionsValidation in core/modules/package_manager/tests/src/Kernel/PhpExtensionsValidatorTest.php
Data provider for ::testPhpExtensionsValidation().
StagedDBUpdateValidatorTest::providerStagedDatabaseUpdate in core/modules/package_manager/tests/src/Kernel/StagedDBUpdateValidatorTest.php
Data provider for ::testStagedDatabaseUpdates().
StageEventsTest::testAddResult in core/modules/package_manager/tests/src/Kernel/StageEventsTest.php
Tests adding validation results to events.
StatusCheckEvent::addWarning in core/modules/package_manager/src/Event/StatusCheckEvent.php
Adds warning information to the event.

... See full list

File

core/modules/package_manager/src/ValidationResult.php, line 107

Class

ValidationResult
A value object to contain the results of a validation.

Namespace

Drupal\package_manager

Code

public static function createWarning(array $messages, ?TranslatableMarkup $summary = NULL) : static {
  return new static(RequirementSeverity::Warning->value, $messages, $summary, TRUE);
}

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