Field Storage API

Implement a storage engine for Field API data.

The Field Attach API uses the Field Storage API to perform all "database access". Each Field Storage API hook function defines a primitive database operation such as read, write, or delete. The default field storage module, field_sql_storage.module, uses the local SQL database to implement these operations, but alternative field storage backends can choose to represent the data in SQL differently or use a completely different storage mechanism such as a cloud-based database.

Each field defines which storage backend it uses. The Drupal system variable 'field_storage_default' identifies the storage backend used by default.

See Field API for information about the other parts of the Field API.


FIELD_STORAGE_INSERTmodules/field/field.attach.incArgument for an insert operation.
FIELD_STORAGE_UPDATEmodules/field/field.attach.incArgument for an update operation.

Functions & methods

hook_field_display_altermodules/field/field.api.phpAlters the display settings of a field before it gets displayed.
hook_field_display_ENTITY_TYPE_altermodules/field/field.api.phpAlters the display settings of a field on a given entity type before it gets displayed.
hook_field_extra_fields_display_altermodules/field/field.api.phpAlters the display settings of pseudo-fields before an entity is displayed.
hook_field_info_max_weightmodules/field/field.api.phpReturns the maximum weight for the entity components handled by the module.
hook_field_storage_create_fieldmodules/field/field.api.phpAct on creation of a new field.
hook_field_storage_deletemodules/field/field.api.phpDelete all field data for an entity.
hook_field_storage_delete_fieldmodules/field/field.api.phpAct on deletion of a field.
hook_field_storage_delete_instancemodules/field/field.api.phpAct on deletion of a field instance.
hook_field_storage_delete_revisionmodules/field/field.api.phpDelete a single revision of field data for an entity.
hook_field_storage_detailsmodules/field/field.api.phpReveal the internal details about the storage for a field.
hook_field_storage_details_altermodules/field/field.api.phpPerform alterations on Field API storage details.
hook_field_storage_infomodules/field/field.api.phpExpose Field API storage backends.
hook_field_storage_info_altermodules/field/field.api.phpPerform alterations on Field API storage types.
hook_field_storage_loadmodules/field/field.api.phpLoad field data for a set of entities.
hook_field_storage_pre_insertmodules/field/field.api.phpAct before the storage backends insert field data.
hook_field_storage_pre_loadmodules/field/field.api.phpAct before the storage backends load field data.
hook_field_storage_pre_updatemodules/field/field.api.phpAct before the storage backends update field data.
hook_field_storage_querymodules/field/field.api.phpExecute an EntityFieldQuery.
hook_field_storage_writemodules/field/field.api.phpWrite field data for an entity.
hook_field_widget_properties_ENTITY_TYPE_altermodules/field/field.api.phpAlters the widget properties of a field instance on a given entity type before it gets displayed.


modules/field/, line 32
Field attach API, allowing entities (nodes, users, ...) to be 'fieldable'.