コード例 #1
0
 static function uninstall($nome_categoria, $nome_modulo)
 {
     if (!InstalledModules::is_installed($nome_categoria, $nome_modulo)) {
         throw new InvalidParametersException();
     }
     $mod_def = InstalledModules::get_installed_module_definition($nome_categoria, $nome_modulo);
     $uninstall_data = $mod_def->get_action_data("uninstall");
     $module_plug = ModuleUtils::getModulePlug($nome_categoria, $nome_modulo);
     $module_plug->execute($uninstall_data);
     //deleting module data : properties
     $prop_storage = self::__get_properties_storage($nome_categoria, $nome_modulo);
     if ($prop_storage->exists()) {
         return $prop_storage->delete();
     }
     //definition file
     $xml_storage = self::__get_xml_storage($nome_categoria, $nome_modulo);
     if ($xml_storage->exists()) {
         return $xml_storage->delete();
     }
     return true;
 }