You are here

function hook_features_export_files in Features 7.2

Module hook. Add extra files to the exported file.

Parameters

string $module_name: Module being processed.

array $export: Array of exported components.

Return value

string[][] An array of files, keyed by file name that will appear in feature and with either file_path key to indicate where to copy the file from or file_content key to indicate the contents of the file. Format: A mix of:

  • $[$path]['file_content'] = $file_content
  • $[$path]['file_path'] = $source_file_to_copy
1 invocation of hook_features_export_files()
features_export_render in ./features.export.inc
Render feature export into an array representing its files.

File

./features.api.php, line 444
Hooks provided by the features module.

Code

function hook_features_export_files($module_name, $export) {
  return array(
    'css/main.css' => array(
      'file_content' => 'body {background-color:blue;}',
    ),
  );
}