function BaseRequirementsFulfilledValidator::validate

Validates that base requirements are fulfilled.

Parameters

\Drupal\package_manager\Event\SandboxValidationEvent $event: The event.

File

core/modules/package_manager/src/Validator/BaseRequirementsFulfilledValidator.php, line 50

Class

BaseRequirementsFulfilledValidator
Validates that base requirements do not have any errors.

Namespace

Drupal\package_manager\Validator

Code

public function validate(SandboxValidationEvent $event) : void {
  // If there are any errors from the validators which ran before this one,
  // base requirements are not fulfilled. Stop any further validators from
  // running.
  if ($event->getResults(RequirementSeverity::Error->value)) {
    $event->stopPropagation();
  }
}

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