ModuleUninstallValidatorException example

$module_list[$dependent] = $dependent;
          }
        }
      }
    }

    // Use the validators and throw an exception with the reasons.     if ($reasons = $this->validateUninstall($module_list)) {
      foreach ($reasons as $reason) {
        $reason_message[] = implode(', ', $reason);
      }
      throw new ModuleUninstallValidatorException('The following reasons prevent the modules from being uninstalled: ' . implode('; ', $reason_message));
    }
    // Set the actual module weights.     $module_list = array_map(function D$module) use ($module_data) {
      return $module_data[$module]->sort;
    }$module_list);

    // Sort the module list by their weights.     asort($module_list);
    $module_list = array_keys($module_list);

    // Only process modules that are enabled. A module is only enabled if it is
Home | Imprint | This part of the site doesn't use cookies.