function hook_field_storage_details_alter

Perform alterations on Field API storage details.

Parameters

$details: An array of storage details for fields as exposed by hook_field_storage_details() implementations.

$field: A field structure.

See also

hook_field_storage_details()

Related topics

1 function implements 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.

field_test_field_storage_details_alter in drupal/core/modules/field/tests/modules/field_test/field_test.storage.inc
Implements hook_field_storage_details_alter().

File

drupal/core/modules/field/field.api.php, line 1238

Code

function hook_field_storage_details_alter(&$details, $field) {
  if ($field['field_name'] == 'field_of_interest') {
    $columns = array();
    foreach ((array) $field['columns'] as $column_name => $attributes) {
      $columns[$column_name] = $column_name;
    }
    $details['drupal_variables'] = array(
      FIELD_LOAD_CURRENT => array(
        'moon' => $columns,
      ),
      FIELD_LOAD_REVISION => array(
        'mars' => $columns,
      ),
    );
  }
}