function config_test_config_import_delete

Implements hook_config_import_delete().

File

drupal/core/modules/config/tests/config_test/config_test.module, line 60
Provides Config module hook implementations for testing purposes.

Code

function config_test_config_import_delete($name, $new_config, $old_config) {
  if (strpos($name, 'config_test.dynamic.') !== 0) {
    return FALSE;
  }

  // Set a global value we can check in test code.
  $GLOBALS['hook_config_import'] = __FUNCTION__;

  // @todo Make this less ugly.
  list(, , $id) = explode('.', $name);
  $config_test = entity_load('config_test', $id);
  $config_test
    ->delete();
  return TRUE;
}