function hook_textformatter_field_info in Text list formatter 7
Same name and namespace in other branches
- 8.2 textformatter.api.php \hook_textformatter_field_info()
hook_textformatter_field_list_info().
Declare new field types/callbacks that are available as text formatter lists.
2 functions implement hook_textformatter_field_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- textformatter_contrib_textformatter_field_info in textformatter_contrib/
textformatter_contrib.module - Implements hook_textformatter_field_info().
- textformatter_textformatter_field_info in ./
textformatter.module - Implements hook_textformatter_field_info().
1 invocation of hook_textformatter_field_info()
- textformatter_field_list_info in ./
textformatter.module - Wrapper function for invoking hook_textformatter_field_list_info.
File
- ./
textformatter.api.php, line 13 - Describes hooks provided by the textformatter module.
Code
function hook_textformatter_field_info() {
$info = array();
// key array with module name.
$info['example'] = array(
// An array of fields that textformatter can be used on. Typically you
// would add the name(s) of the fields you are integrating here.
'fields' => array(
'example',
'example_other',
),
// Callback to process $items from hook_field_formatter_view, and format
// an array of values that will be used in the displayed list.
'callback' => 'textformatter_example_field_create_list',
// An array of settings/default settings that will be used. Anything
// defined in here will be merged into the textformatter_contrib array in
// The field formatter info. If your settings are not declared here, no
// defaults wil exist.
'settings' => array(
'textformatter_example_setting' => TRUE,
),
);
return $info;
}