function text_widget_info in Content Construction Kit (CCK) 6
Same name in this branch
- 6 examples/simple_field.php \text_widget_info()
- 6 examples/example_field.php \text_widget_info()
- 6 modules/text/text.module \text_widget_info()
Same name and namespace in other branches
- 5 text.module \text_widget_info()
- 6.3 modules/text/text.module \text_widget_info()
- 6.2 modules/text/text.module \text_widget_info()
Implementation of hook_widget_info().
Here we indicate that the content module will handle the default value and multiple values for these widgets.
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.
IMPORTANT! - field and widget names will be truncated to 32 characters in the database and in internal arrays, like content_fields().
File
- examples/
example_field.php, line 472 - These hooks are defined by field modules, modules that define a new kind of field for insertion in a content type.
Code
function text_widget_info() {
return array(
'text_textfield' => array(
'label' => t('Text field'),
'field types' => array(
'text',
),
'multiple values' => CONTENT_HANDLE_CORE,
'callbacks' => array(
'default value' => CONTENT_CALLBACK_DEFAULT,
),
),
'text_textarea' => array(
'label' => t('Text area'),
'field types' => array(
'text',
),
'multiple values' => CONTENT_HANDLE_CORE,
'callbacks' => array(
'default value' => CONTENT_CALLBACK_DEFAULT,
),
),
);
}