1 config_test_hooks.module config_test_hooks_config_create(Config $staging_config)

Implements hook_config_create().

File

core/modules/config/tests/config_test_hooks/config_test_hooks.module, line 43
Tests the hooks provided by Configuration management module.

Code

function config_test_hooks_config_create(Config $staging_config) {
  if ($staging_config->getName() === 'config_test.new_config') {
    // Set a value before the config is saved.
    $staging_config->set('favorite_color', 'red');
  }
}