function name_field_formatter_info in Name Field 6
Same name and namespace in other branches
- 7 name.module \name_field_formatter_info()
Implementation of hook_field_formatter_info().
File
- ./
name.module, line 833 - Defines an API for displaying and inputing names.
Code
function name_field_formatter_info() {
$formatters = array();
// Three formatter types are returned here: default, raw & plain.
foreach (_name_formatter_output_types() as $type => $title) {
$type_info = $type == 'default' ? '' : ' (' . $title . ')';
$formatters[$type] = array(
'label' => t('Default') . $type_info,
'field types' => array(
'name',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
foreach (name_get_custom_format_options() as $machine_name => $name_title) {
$formatters[$type . '_' . $machine_name] = array(
'label' => $name_title . $type_info,
'field types' => array(
'name',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
}
}
return $formatters;
}