You are here

public function PhpUninstallValidator::validate in PHP 8

Determines the reasons a module can not be uninstalled.

Parameters

string $module: A module name.

Return value

string[] An array of reasons the module can not be uninstalled, empty if it can. Each reason should not end with any punctuation since multiple reasons can be displayed together.

Overrides FilterUninstallValidator::validate

See also

template_preprocess_system_modules_uninstall()

File

src/PhpUninstallValidator.php, line 15

Class

PhpUninstallValidator
Remove filter preventing Php uninstall.

Namespace

Drupal\php

Code

public function validate($module) {
  $reasons = [];
  if ($module == 'php') {
    $this
      ->removeFilterConfig();
  }
  return $reasons;
}