You are here

function views_api_features_export in Features 6

Implementation of hook_features_export().

File

includes/features.views.inc, line 6

Code

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

  // Add views dependency
  $export['dependencies']['views'] = 'views';

  // Add the actual views API hook entries to be accounted for in
  // hook_views_api(). The components are actually identified by a delimited
  // list of values: `key:value`. Currently only the 'api' key is supported
  // as Features does not yet know how to write to subdirectories.
  foreach ($data as $component) {
    if (is_numeric($component)) {
      $version = "api:{$component}";
      $export['features']['views_api'][$version] = $version;
    }
  }
  return array();
}