Defines field, widget, display formatter, and storage types.
In the Field API, each field has a type, which determines what kind of data (integer, string, date, etc.) the field can hold, which settings it provides, and so on. The data type(s) accepted by a field are defined in hook_field_schema(); other basic properties of a field are defined in hook_field_info(). The other hooks below are called by the Field Attach API to perform field-type-specific actions.
The Field Types API also defines two kinds of pluggable handlers: widgets and formatters. Widgets specify how the field appears in edit forms, while formatters specify how the field appears in displayed entities.
A third kind of pluggable handler, storage backends, is defined by the Field Storage API.
See Field API for information about the other parts of the Field API.
Name | Location | Description |
---|---|---|
hook_field_delete |
drupal/ |
Define custom delete behavior for this module's field data. |
hook_field_delete_revision |
drupal/ |
Define custom revision delete behavior for this module's field types. |
hook_field_formatter_settings_form_alter |
drupal/ |
Alter the formatter settings form. |
hook_field_formatter_settings_summary_alter |
drupal/ |
Alter the field formatter settings summary. |
hook_field_info |
drupal/ |
Define Field API field types. |
hook_field_info_alter |
drupal/ |
Perform alterations on Field API field types. |
hook_field_insert |
drupal/ |
Define custom insert behavior for this module's field data. |
hook_field_instance_settings_form |
drupal/ |
Add settings to an instance field settings form. |
hook_field_is_empty |
drupal/ |
Define what constitutes an empty item for a field type. |
hook_field_load |
drupal/ |
Define custom load behavior for this module's field types. |
hook_field_prepare_translation |
drupal/ |
Define custom prepare_translation behavior for this module's field types. |
hook_field_prepare_view |
drupal/ |
Prepare field values prior to display. |
hook_field_presave |
drupal/ |
Define custom presave behavior for this module's field types. |
hook_field_schema |
drupal/ |
Define the Field API schema for a field structure. |
hook_field_settings_form |
drupal/ |
Add settings to a field settings form. |
hook_field_storage_update_field |
drupal/ |
Update the storage information for a field. |
hook_field_update |
drupal/ |
Define custom update behavior for this module's field data. |
hook_field_validate |
drupal/ |
Validate this module's field data. |