ModuleUninstallValidatorInterface.php 668 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php

/**
 * @file
 * Contains Drupal\Core\Extension\ModuleUninstallValidatorInterface.
 */

namespace Drupal\Core\Extension;

/**
 * Common interface for module uninstall validators.
 */
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.
23 24 25 26
   *   Each reason should not end with any punctuation since multiple reasons
   *   can be displayed together.
   *
   * @see theme_system_modules_uninstall()
27 28 29
   */
  public function validate($module);
}