You are here

function schemaorg_features_export in Schema.org 7

Implementation of hook_features_export().

Defines one or more component types that are available to Features for export and a variety of settings for each type.

File

./schemaorg.features.inc, line 8

Code

function schemaorg_features_export($data, &$export, $module_name = '') {

  // Any feature exporting RDF mappings need the rdf and rdfx modules.
  $export['dependencies']['rdf'] = 'rdf';
  $export['dependencies']['schemaorg'] = 'schemaorg';
  foreach ($data as $name) {
    $parts = explode('-', $name);
    $entity_type = $parts[0];
    $bundle_name = $parts[1];
    if ($rdf_mapping = rdf_mapping_load($entity_type, $bundle_name)) {
      $export['features']['schemaorg'][$entity_type . '-' . $bundle_name] = $entity_type . '-' . $bundle_name;
    }
  }
  return array();
}