function MultisiteValidator::validate

Validates that the current site is not part of a multisite.

Overrides BaseRequirementValidatorTrait::validate

File

core/modules/package_manager/src/Validator/MultisiteValidator.php, line 31

Class

MultisiteValidator
Checks that the current site is not part of a multisite.

Namespace

Drupal\package_manager\Validator

Code

public function validate(PreOperationStageEvent $event) : void {
    if ($this->isMultisite()) {
        $event->addError([
            $this->t('Drupal multisite is not supported by Package Manager.'),
        ]);
    }
}

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