You are here

function hook_field_info in Content Construction Kit (CCK) 5

Declare information about a field type.

Return value

An array keyed by field type name. Each element of the array is an associative array with these keys and values:

  • "label": The human-readable label for the field type.

IMPORTANT! - field and widget names will be truncated to 32 characters in the database and in internal arrays, like content_fields().

4 functions implement hook_field_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

nodereference_field_info in ./nodereference.module
Implementation of hook_field_info().
number_field_info in ./number.module
Implementation of hook_field_info().
text_field_info in ./text.module
Implementation of hook_field_info().
userreference_field_info in ./userreference.module
Implementation of hook_field_info().
1 invocation of hook_field_info()
_content_type_info in ./content.module
Collate all information on content types, fields, and related structures.

File

./field.php, line 33
These hooks are defined by field modules, modules that define a new kind of field for insertion in a content type.

Code

function hook_field_info() {
  return array(
    'number_integer' => array(
      'label' => t('Integer'),
    ),
    'number_decimal' => array(
      'label' => t('Decimal'),
    ),
  );
}