You are here

function uuid_node_features_export in UUID Features Integration 6

Same name and namespace in other branches
  1. 7 includes/uuid_node.features.inc \uuid_node_features_export()

Implementation of hook_features_export().

File

includes/uuid_node.features.inc, line 32
Features hooks for the uuid_node features component.

Code

function uuid_node_features_export($data, &$export, $module_name = '') {
  $pipe = array();
  $export['dependencies']['uuid_features'] = 'uuid_features';
  uuid_features_load_module_includes();
  foreach ($data as $uuid) {
    $node = node_get_by_uuid($uuid);
    $export['features']['uuid_node'][$uuid] = $uuid;
    $pipe['node'][$node->type] = $node->type;

    // 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_node_features_export_alter(&$export, &$pipe, $node)
    $data =& $export;
    $data['__drupal_alter_by_ref'] = array(
      &$pipe,
    );
    drupal_alter('uuid_node_features_export', $data, $node);
  }
  return $pipe;
}