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.
$field: A field structure.
An array of details.
hook_field_storage_details_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_field_storage_details($field) {
$details = array();
// Add field columns.
foreach ((array) $field['columns'] as $column_name => $attributes) {
$real_name = _field_sql_storage_columnname($field['field_name'], $column_name);
$columns[$column_name] = $real_name;
}
return array(
'sql' => array(
FIELD_LOAD_CURRENT => array(
_field_sql_storage_tablename($field) => $columns,
),
FIELD_LOAD_REVISION => array(
_field_sql_storage_revision_tablename($field) => $columns,
),
),
);
}