function exif_custom_export_map in EXIF Custom 7
Custom function for exporting mappings to code.
1 call to exif_custom_export_map()
- exif_custom_features_export_render in ./
exif_custom.features.inc - Implements COMPONENT_features_export_render().
File
- ./
exif_custom.features.inc, line 95 - Features file for the exif_custom module.
Code
function exif_custom_export_map($name) {
$map = array();
// Get the mid.
if ($mid = exif_custom_get_mid($name)) {
// Get the name.
$name = db_select('exif_custom_maps', 'm')
->fields('m', array(
'name',
))
->condition('m.mid', $mid)
->execute()
->fetchField();
// Get all of the field mappings.
$fields = db_select('exif_custom_mapped_fields', 'mf')
->fields('mf', array(
'exif_field',
'exif_example',
'img_field',
))
->condition('mf.mid', $mid)
->execute()
->fetchAll();
$map = array(
'name' => $name,
'fields' => $fields,
);
}
return $map;
}