summaryrefslogtreecommitdiff
path: root/modules/field/field.api.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/field/field.api.php')
-rw-r--r--modules/field/field.api.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php
index 60e54d5d8..84a9b07e9 100644
--- a/modules/field/field.api.php
+++ b/modules/field/field.api.php
@@ -1141,6 +1141,47 @@ function hook_field_storage_info_alter(&$info) {
}
/**
+ * Reveal the internal details about the storage for a field.
+ *
+ * For example, an SQL storage module might return the Schema API structure for
+ * the table. A key/value storage module might return the server name,
+ * authentication credentials, and bin name.
+ *
+ * Field storage modules are not obligated to implement this hook. Modules
+ * that rely on these details must only use them for read operations.
+ *
+ * @param $field
+ * A field structure.
+ * @param $instance
+ * A field instance structure.
+ * @return
+ * An array of details.
+ * - The first dimension is a store type (sql, solr, etc).
+ * - The second dimension indicates the age of the values in the store
+ * FIELD_LOAD_CURRENT or FIELD_LOAD_REVISION.
+ * - Other dimensions are specific to the field storage module.
+ */
+function hook_field_storage_details($field, $instance) {
+}
+
+/**
+ * Perform alterations on Field API storage details.
+ *
+ * The storage details are appended to the field instance structure after this
+ * hook is invoked. Read and alter the $details only.
+ *
+ * @param $details
+ * An array of storage details for fields as exposed by
+ * hook_field_storage_details() implementations.
+ * @param $field
+ * A field structure.
+ * @param $instance
+ * A field instance structure.
+ */
+function hook_field_storage_details_alter(&$details, $field, $instance) {
+}
+
+/**
* Load field data for a set of objects.
*
* @param $obj_type