Field Formatter API

Define Field API formatter types.

Field API formatters specify how fields are displayed when the entity to which the field is attached is displayed. Fields of a given field type may be displayed using more than one formatter. In this case, the Field UI module allows the site builder to choose which formatter to use. Field formatters are defined by implementing hook_field_formatter_info().

See also

Field API

Field Types API

Field Widget API

Functions & methods

NameLocationDescription
hook_field_formatter_infomodules/field/field.api.phpExpose Field API formatter types.
hook_field_formatter_info_altermodules/field/field.api.phpPerform alterations on Field API formatter types.
hook_field_formatter_prepare_viewmodules/field/field.api.phpAllow formatters to load information for field values being displayed.
hook_field_formatter_viewmodules/field/field.api.phpBuild a renderable array for a field value.

File

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