diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-14 14:55:12 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-14 14:55:12 +0000 |
commit | a243e821fa8c19f5cdaae5af0495fcccdda70125 (patch) | |
tree | bda3f7e669281b2bd2d2d49fdb7a44c296d2d92e /modules/field/field.api.php | |
parent | 7a9fc8a33d49badf34b6f41bed978a2aad004745 (diff) | |
download | brdo-a243e821fa8c19f5cdaae5af0495fcccdda70125.tar.gz brdo-a243e821fa8c19f5cdaae5af0495fcccdda70125.tar.bz2 |
- Pactch #569224 by bangpound: expose field storage details through field attach.
Diffstat (limited to 'modules/field/field.api.php')
-rw-r--r-- | modules/field/field.api.php | 41 |
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 |