function hook_field_storage_create_field
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.
Parameters
$field: The field structure being created.
Related topics
File
- modules/field/field.api.php, line 2117
- Hooks provided by the Field module.
Code
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); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!field.api.php/function/hook_field_storage_create_field/7.x