class ConfigImporterFieldPurger (View source)

Processes field purges before a configuration synchronization.

Methods

static 
process(array $context, ConfigImporter $config_importer)

Processes fields targeted for purge as part of a configuration sync.

static 
initializeSandbox(array $context, ConfigImporter $config_importer)

Initializes the batch context sandbox for processing field deletions.

static FieldStorageConfig[]
getFieldStoragesToPurge(array $extensions, array $deletes)

Gets the list of fields to purge before configuration synchronization.

Details

static process(array $context, ConfigImporter $config_importer)

Processes fields targeted for purge as part of a configuration sync.

This takes care of deleting the field if necessary, and purging the data on the fly.

Parameters

array $context

The batch context.

ConfigImporter $config_importer

The config importer.

static protected initializeSandbox(array $context, ConfigImporter $config_importer)

Initializes the batch context sandbox for processing field deletions.

This calculates the number of steps necessary to purge all the field data and saves data for later use.

Parameters

array $context

The batch context.

ConfigImporter $config_importer

The config importer.

static FieldStorageConfig[] getFieldStoragesToPurge(array $extensions, array $deletes)

Gets the list of fields to purge before configuration synchronization.

If, during a configuration synchronization, a field is being deleted and the module that provides the field type is being uninstalled then the field data must be purged before the module is uninstalled. Also, if deleted fields exist whose field types are provided by modules that are being uninstalled their data need to be purged too.

Parameters

array $extensions

The list of extensions that will be enabled after the configuration synchronization has finished.

array $deletes

The configuration that will be deleted by the configuration synchronization.

Return Value

FieldStorageConfig[]

An array of field storages that need purging before configuration can be synchronized.