function contact_config_import_create

Implements MODULE_config_import_create().

File

drupal/core/modules/contact/contact.module, line 166
Enables the use of personal and site-wide contact forms.

Code

function contact_config_import_create($name, $new_config, $old_config) {
  if (strpos($name, 'contact.category.') !== 0) {
    return FALSE;
  }
  $category = entity_create('contact_category', $new_config
    ->get());
  $category
    ->save();
  return TRUE;
}