final class ExcludedModulesEventSubscriber implements EventSubscriberInterface (View source)

The event subscriber preventing excluded modules to be exported.

Constants

EXCLUDED_MODULES_KEY

The key in settings and state for listing excluded modules.

Methods

__construct(StorageInterface $active_storage, Settings $settings, ConfigManagerInterface $manager)

EnvironmentModulesEventSubscriber constructor.

static 
getSubscribedEvents()

{@inheritdoc}

onConfigTransformImport(StorageTransformEvent $event)

Transform the storage which is used to import the configuration.

onConfigTransformExport(StorageTransformEvent $event)

Transform the storage which is used to export the configuration.

Details

__construct(StorageInterface $active_storage, Settings $settings, ConfigManagerInterface $manager)

EnvironmentModulesEventSubscriber constructor.

Parameters

StorageInterface $active_storage

The active config storage.

Settings $settings

The Drupal settings.

ConfigManagerInterface $manager

The config manager.

static getSubscribedEvents()

{@inheritdoc}

onConfigTransformImport(StorageTransformEvent $event)

Transform the storage which is used to import the configuration.

Make sure excluded modules are not uninstalled by adding them and their config to the storage when importing configuration.

Parameters

StorageTransformEvent $event

The transformation event.

onConfigTransformExport(StorageTransformEvent $event)

Transform the storage which is used to export the configuration.

Make sure excluded modules are not exported by removing all the config which depends on them from the storage that is exported.

Parameters

StorageTransformEvent $event

The transformation event.