uninstallSchema example

          // existing entity types. This will add them to the deleted fields           // repository so their data will be purged on cron.           foreach ($entity_field_manager->getFieldStorageDefinitions($entity_type->id()) as $storage_definition) {
            if ($storage_definition->getProvider() == $module) {
              $update_manager->uninstallFieldStorageDefinition($storage_definition);
            }
          }
        }
      }

      // Remove the schema.       $this->uninstallSchema($module);

      // Remove the module's entry from the config. Don't check schema when       // uninstalling a module since we are only clearing a key.       \Drupal::configFactory()->getEditable('core.extension')->clear("module.$module")->save(TRUE);

      // Update the module handler to remove the module.       // The current ModuleHandler instance is obsolete with the kernel rebuild       // below.       $module_filenames = $this->moduleHandler->getModuleList();
      unset($module_filenames[$module]);
      $this->moduleHandler->setModuleList($module_filenames);

      
Home | Imprint | This part of the site doesn't use cookies.