You are here

function hook_key_provider_info_alter in Key 8

Alter the definitions of Key Provider plugins.

This hook is invoked by KeyProviderManager::__construct().

Parameters

array $key_providers: An array containing all of the key provider plugin definitions.

File

./key.api.php, line 16
Hooks specific to the Key module.

Code

function hook_key_provider_info_alter(array &$key_providers) {

  // Swap the classes used for the Configuration and File key providers.
  $key_providers['config']['class'] = 'Drupal\\key\\Plugin\\KeyProvider\\FileKeyProvider';
  $key_providers['file']['class'] = 'Drupal\\key\\Plugin\\KeyProvider\\ConfigKeyProvider';
}