Skip to content

Instantly share code, notes, and snippets.

@e0ipso
Created October 13, 2014 15:33
Show Gist options
  • Save e0ipso/f9fe272e81a115bcc2f9 to your computer and use it in GitHub Desktop.
Save e0ipso/f9fe272e81a115bcc2f9 to your computer and use it in GitHub Desktop.
Multifield features patch
diff --git a/multifield.features.inc b/multifield.features.inc
index ca7a8ab..152ebc1 100644
--- a/multifield.features.inc
+++ b/multifield.features.inc
@@ -30,3 +30,29 @@ function multifield_features_pipe_field_base_alter(&$pipe, $data, $export) {
}
}
}
+
+/**
+ * Implements hook_features_export().
+ */
+function multifield_features_export($data, &$export, $module_name) {
+ // The following is the simplest implementation of a straight object export
+ // with no further export processors called.
+ foreach ($data as $component) {
+ $export['features']['multifield'][$component] = $component;
+ }
+ return array();
+}
+
+/**
+ * Implements hook_features_api().
+ */
+function multifield_features_api() {
+ return array(
+ 'multifield' => array(
+ 'name' => t('Multifield'),
+ 'feature_source' => TRUE,
+ 'default_hook' => 'multifield_default_multifield',
+ 'default_file' => FEATURES_DEFAULTS_INCLUDED,
+ ),
+ );
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment