Field Types API

  1. drupal
    1. drupal7

Define field types, widget types, and display formatter types.

The bulk of the Field Types API are related to field types. A field type represents a particular data storage type (integer, string, date, etc.) that can be attached to a fieldable object. hook_field_info() defines the basic properties of a field type, and a variety of other field hooks are called by the Field Attach API to perform field-type-specific actions.

The Field Types API also defines widget types via hook_field_widget_info(). Widgets are Form API elements with additional processing capabilities. A field module can define widgets that work with its own field types or with any other module's field types. Widget hooks are typically called by the Field Attach API when creating the field form elements during field_attach_form().

TODO Display formatters.

Funktionen & Methoden

NameBeschreibung
hook_field_deleteDefine custom delete behavior for this module's field types.
hook_field_delete_revisionDefine custom delete_revision behavior for this module's field types.
hook_field_formatter_info
hook_field_infoDefine Field API field types.
hook_field_insertDefine custom insert behavior for this module's field types.
hook_field_loadDefine custom load behavior for this module's field types.
hook_field_prepare_translationDefine custom prepare_translation behavior for this module's field types.
hook_field_presaveDefine custom presave behavior for this module's field types.
hook_field_sanitizeDefine custom sanitize behavior for this module's field types.
hook_field_schemaDefine the Field API schema for a field structure.
hook_field_updateDefine custom update behavior for this module's field types.
hook_field_validateDefine custom validate behavior for this module's field types.
hook_field_widgetReturn a single form element for a form.
hook_field_widget_errorFlag a field-level validation error.
hook_field_widget_infoDefine Field API widget types.

modules/field/field.api.php, line 60

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen