function uuid_fpp_features_export in UUID Features Integration 7
Implements hook_features_export().
File
- includes/
uuid_fpp.features.inc, line 34 - Features hooks for the uuid_fpp features component.
Code
function uuid_fpp_features_export($data, &$export, $module_name = '') {
$export['dependencies']['fieldable_panels_panes'] = 'fieldable_panels_panes';
$export['dependencies']['uuid_features'] = 'uuid_features';
// Add extra dependencies so we don't lose track of bundles.
$fpp_modules = _uuid_fpp_features_dependencies($data);
foreach ($fpp_modules as $module) {
$export['dependencies'][$module] = $module;
}
$fpids = entity_get_id_by_uuid('fieldable_panels_pane', $data);
foreach ($fpids as $uuid => $fpid) {
// Load the FPP matching the $fpid.
$query = new EntityFieldQuery();
$fpp = $query
->entityCondition('entity_type', 'fieldable_panels_pane')
->propertyCondition('fpid', $fpid)
->range(0, 1)
->execute();
$export['features']['uuid_fpp'][$uuid] = $uuid;
$pipe['fieldable_panels_pane'][$fpp['fieldable_panels_pane'][$fpid]->bundle] = $fpp['fieldable_panels_pane'][$fpid]->bundle;
// drupal_alter() normally supports just one byref parameter. Using
// the __drupal_alter_by_ref key, we can store any additional parameters
// that need to be altered, and they'll be split out into additional params
// for the hook_*_alter() implementations. The hook_alter signature is
// hook_uuid_fpp_features_export_alter(&$export, &$pipe, $fpp).
$data =& $export;
$data['__drupal_alter_by_ref']['pipe'] = array(
&$pipe,
);
drupal_alter('uuid_fpp_features_export', $data, $fpp);
}
return $pipe;
}