You are here

function taxonomy_configuration_export_render in Configuration Management 7

Implements hook_configuration_export_render().

2 calls to taxonomy_configuration_export_render()
configuration_check_taxonomy in includes/configuration.taxonomy.inc
configuration_hash_taxonomy in includes/configuration.taxonomy.inc

File

includes/configuration.taxonomy.inc, line 61

Code

function taxonomy_configuration_export_render($module, $data) {
  $vocabularies = taxonomy_get_vocabularies();
  $code = array();
  foreach ($data as $machine_name) {
    foreach ($vocabularies as $vocabulary) {
      if ($vocabulary->machine_name == $machine_name) {

        // We don't want to break the entity cache, so we need to clone the
        // vocabulary before unsetting the id.
        $vocabulary = clone $vocabulary;
        unset($vocabulary->vid);
        $code[$machine_name] = $vocabulary;
      }
    }
  }
  $code = "  return " . configuration_var_export($code, '  ') . ";";
  return array(
    'taxonomy_default_vocabularies' => $code,
  );
}