You are here

function text_field_info in Content Construction Kit (CCK) 6

Same name in this branch
  1. 6 examples/simple_field.php \text_field_info()
  2. 6 examples/example_field.php \text_field_info()
  3. 6 modules/text/text.module \text_field_info()
Same name and namespace in other branches
  1. 5 text.module \text_field_info()
  2. 6.3 modules/text/text.module \text_field_info()
  3. 6.2 modules/text/text.module \text_field_info()

Implementation of hook_field_info().

Here we indicate that the content module will use its default handling for the view of this field.

Callbacks can be omitted if default handing is used. They're included here just so this module can be used as an example for custom modules that might do things differently.

If your module will provide its own Views tables or arguments, change CONTENT_CALLBACK_DEFAULT to CONTENT_CALLBACK_CUSTOM.

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

File

examples/simple_field.php, line 111
SIMPLE EXAMPLE. This is similar to to example_field but creates only a single widget formatted in the traditional manner, not using hook_elements. This example also omits all optional parts of the field module to create a simpler example for…

Code

function text_field_info() {
  return array(
    'text' => array(
      'label' => t('Text'),
    ),
  );
}