ModuleUninstallValidatorInterface.php 778 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Drupal\Core\Extension;
  3. /**
  4. * Common interface for module uninstall validators.
  5. *
  6. * A module uninstall validator must implement this interface and be defined in
  7. * a Drupal @link container service @endlink that is tagged
  8. * module_install.uninstall_validator.
  9. */
  10. interface ModuleUninstallValidatorInterface {
  11. /**
  12. * Determines the reasons a module can not be uninstalled.
  13. *
  14. * @param string $module
  15. * A module name.
  16. *
  17. * @return string[]
  18. * An array of reasons the module can not be uninstalled, empty if it can.
  19. * Each reason should not end with any punctuation since multiple reasons
  20. * can be displayed together.
  21. *
  22. * @see template_preprocess_system_modules_uninstall()
  23. */
  24. public function validate($module);
  25. }