You are here

interface ModuleUninstallValidatorInterface in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Extension/ModuleUninstallValidatorInterface.php \Drupal\Core\Extension\ModuleUninstallValidatorInterface
  2. 10 core/lib/Drupal/Core/Extension/ModuleUninstallValidatorInterface.php \Drupal\Core\Extension\ModuleUninstallValidatorInterface

Common interface for module uninstall validators.

A module uninstall validator must implement this interface and be defined in a Drupal service that is tagged module_install.uninstall_validator.

Hierarchy

Expanded class hierarchy of ModuleUninstallValidatorInterface

All classes that implement ModuleUninstallValidatorInterface

5 files declare their use of ModuleUninstallValidatorInterface
BookUninstallValidator.php in core/modules/book/src/BookUninstallValidator.php
ContentUninstallValidator.php in core/lib/Drupal/Core/Entity/ContentUninstallValidator.php
FieldUninstallValidator.php in core/modules/field/src/FieldUninstallValidator.php
FilterUninstallValidator.php in core/modules/filter/src/FilterUninstallValidator.php
ForumUninstallValidator.php in core/modules/forum/src/ForumUninstallValidator.php

File

core/lib/Drupal/Core/Extension/ModuleUninstallValidatorInterface.php, line 12

Namespace

Drupal\Core\Extension
View source
interface ModuleUninstallValidatorInterface {

  /**
   * Determines the reasons a module can not be uninstalled.
   *
   * @param string $module
   *   A module name.
   *
   * @return 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.
   *
   * @see template_preprocess_system_modules_uninstall()
   */
  public function validate($module);

}

Members

Namesort descending Modifiers Type Description Overrides
ModuleUninstallValidatorInterface::validate public function Determines the reasons a module can not be uninstalled. 14