You are here

public static function ValidationResult::createError in Automatic Updates 8.2

Creates an error ValidationResult object.

Parameters

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

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

Return value

static

17 calls to ValidationResult::createError()
ComposerExecutableValidator::checkForComposerExecutable in src/Validator/ComposerExecutableValidator.php
Validates that the Composer executable can be found.
ComposerExecutableValidatorTest::providerComposerVersionValidation in tests/src/Kernel/ReadinessValidation/ComposerExecutableValidatorTest.php
Data provider for ::testComposerVersionValidation().
ComposerExecutableValidatorTest::testErrorIfComposerNotFound in tests/src/Kernel/ReadinessValidation/ComposerExecutableValidatorTest.php
Tests that an error is raised if the Composer executable isn't found.
CoreComposerValidator::checkCoreRequirements in src/Validator/CoreComposerValidator.php
Validates the Drupal core requirements in composer.json.
CoreComposerValidatorTest::testCoreNotRequired in tests/src/Kernel/ReadinessValidation/CoreComposerValidatorTest.php
Tests that an error is raised if core is not required in composer.json.

... See full list

File

src/Validation/ValidationResult.php, line 64

Class

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

Namespace

Drupal\automatic_updates\Validation

Code

public static function createError(array $messages, ?TranslatableMarkup $summary = NULL) : self {
  return new static(SystemManager::REQUIREMENT_ERROR, $messages, $summary);
}