1 field.api.php hook_field_storage_create_field($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


core/modules/field/field.api.php, line 2165
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);
  backdrop_get_schema(NULL, TRUE);