Community Documentation

CCK Hook Documentation (Drupal 6.x)

Last updated November 11, 2011. Created by rmiddle on December 5, 2008.
Edited by firebus, Scyther, sharplesa, lsburton. Log in to edit this page.

These are the defined callback functions which CCK will call. They are similar to Drupal's core hooks, but not part of that set. They follow the same naming convention, that is, if your module is named foo and defines a CCK field, then the hook_field function would be named foo_field().

Required CCK hooks for CCK fields

  • hook_field_info - To define new field type(s) in your module, use hook_field_info to tell CCK about those types.

    For example, number.module defines number_integer, number_decimal, and number_float. And text.module simply defines text.

  • hook_field_formatter_info

Required CCK hooks for CCK widgets

Optional CCK hooks

Page status

About this page

Drupal version
Drupal 6.x
Audience
Developers and coders
Level
Intermediate

Structure Guide

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.