field.module

Version 1.94 (checked in on 2011/01/02 at 17:26:39 by webchick)

Attach custom data fields to Drupal entities.

Classes

NameDescription
FieldExceptionBase class for all exceptions thrown by Field API functions.
FieldUpdateForbiddenExceptionException class thrown by hook_field_update_forbid().

Functions & methods

NameDescription
field_accessDetermine whether the user has access to a given field.
field_associate_fieldsAllows a module to update the database for fields and columns it controls.
field_bundle_settingsGets or sets administratively defined bundle settings.
field_cache_clearClear the field info and field data caches.
field_cronImplements hook_cron().
field_extract_bundleHelper function to extract the bundle name of from a bundle object.
field_extra_fields_get_displayReturns the display settings to use for pseudo-fields in a given view mode.
field_filter_xssLike filter_xss_admin(), but with a shorter list of allowed tags.
field_flush_cachesImplements hook_flush_caches().
field_get_default_valueHelper function to get the default value for a field on an entity.
field_get_displayReturns the display settings to use for an instance in a given view mode.
field_get_itemsReturns the field items in the language they currently would be displayed.
field_has_dataDetermine whether a field has any data.
field_helpImplements hook_help().
field_modules_disabledImplements hook_modules_disabled().
field_modules_enabledImplements hook_modules_enabled().
field_modules_uninstalledImplements hook_modules_uninstalled().
field_themeImplements hook_theme().
field_view_fieldReturns a renderable array for the value of a single field in an entity.
field_view_mode_settingsReturns view mode settings in a given bundle.
field_view_valueReturns a renderable array for a single field value.
template_preprocess_fieldTheme preprocess function for theme_field() and field.tpl.php.
template_process_fieldTheme process function for theme_field() and field.tpl.php.
theme_fieldReturns HTML for a field.
_element_validate_integerHelper form element validator: integer.
_element_validate_integer_positiveHelper form element validator: integer > 0.
_element_validate_numberHelper form element validator: number.
_field_extra_fields_pre_renderPre-render callback to adjust weights and visibility of non-field elements.
_field_filter_itemsHelper function to filter out empty field values.
_field_filter_xss_allowed_tagsList of tags allowed by field_filter_xss().
_field_filter_xss_display_allowed_tagsHuman-readable list of allowed tags, for display in help texts.
_field_sort_itemsHelper function to sort items in a field according to user drag-n-drop reordering.
_field_sort_items_helperSort function for items order. (copied form element_sort(), which acts on #weight keys)
_field_sort_items_value_helperSame as above, using ['_weight']['#value']

Constants

NameDescription
FIELD_BEHAVIOR_CUSTOMValue for field API indicating a widget can receive several field values.
FIELD_BEHAVIOR_DEFAULTValue for field API concerning widget default and multiple value settings.
FIELD_BEHAVIOR_NONEValue for field API indicating a widget doesn't accept default values.
FIELD_CARDINALITY_UNLIMITEDValue for field API indicating a field accepts an unlimited number of values.
FIELD_LOAD_CURRENTAge argument for loading the most recent version of an entity's field data with field_attach_load().
FIELD_LOAD_REVISIONAge argument for loading the version of an entity's field data specified in the entity with field_attach_load().