Returns information about field formatters from hook_field_formatter_info().
$formatter_type: (optional) A formatter type name. If omitted, all formatter types will be returned.
Either a single formatter type description, as provided by hook_field_formatter_info(), or an array of all existing formatter types, keyed by formatter type name.
function field_info_formatter_types($formatter_type = NULL) {
$info = _field_info_collate_types();
$formatter_types = $info['formatter types'];
if ($formatter_type) {
if (isset($formatter_types[$formatter_type])) {
return $formatter_types[$formatter_type];
}
}
else {
return $formatter_types;
}
}