You are here

function fe_block_settings_features_export in Features Extra 7

Same name and namespace in other branches
  1. 6 fe_block.module \fe_block_settings_features_export()

Implements hook_features_export().

File

fe_block/fe_block.module, line 66
Provide features components for exporting core blocks and settings.

Code

function fe_block_settings_features_export($data, &$export, $module_name = '') {
  $pipe = array();
  $export['dependencies']['fe_block'] = 'fe_block';
  $component = 'fe_block_settings';

  // Add the components.
  foreach ($data as $object_name) {
    $export['features'][$component][$object_name] = $object_name;

    // Boxes.
    if (strpos($object_name, 'block-') === 0) {
      $machine_name = substr($object_name, strlen('block-'));
      $pipe['fe_block_boxes'][$machine_name] = $machine_name;
    }
    else {
      $pipe['block'][$object_name] = $object_name;
    }
  }
  return $pipe;
}