function hook_field_storage_create_field

Act on creation of a new field.

This hook is invoked from field_create_field() to ask the field storage module to save field information and prepare for storing field instances. If there is a problem, the field storage module should throw an exception.


$field: The field structure being created.

Related topics

2 functions implement hook_field_storage_create_field()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

field_sql_storage_field_storage_create_field in drupal/modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_create_field().
field_test_field_storage_create_field in drupal/modules/field/tests/
Implements hook_field_storage_create_field().
1 invocation of hook_field_storage_create_field()
field_create_field in drupal/modules/field/
Creates a field.


drupal/modules/field/field.api.php, line 2117
Hooks provided by the Field module.


function hook_field_storage_create_field($field) {
  $schema = _field_sql_storage_schema($field);
  foreach ($schema as $name => $table) {
    db_create_table($name, $table);
  drupal_get_schema(NULL, TRUE);