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

7 calls to ValidationResult::createWarning()
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.
ValidationResultTest::testCreateWarningResult in core/modules/package_manager/tests/src/Unit/ValidationResultTest.php
@covers ::createWarning

... See full list

File

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

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(SystemManager::REQUIREMENT_WARNING, $messages, $summary, TRUE);
}

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