2 * Implements hook_field_formatter_info().
4 function {{ machine_name }}_field_formatter_info() {
6 'text_default' => array(
7 'label' => t('Default'),
8 'field types' => array('text', 'text_long', 'text_with_summary'),
10 'text_plain' => array(
11 'label' => t('Plain text'),
12 'field types' => array('text', 'text_long', 'text_with_summary'),
15 // The text_trimmed formatter displays the trimmed version of the
16 // full element of the field. It is intended to be used with text
17 // and text_long fields. It also works with text_with_summary
18 // fields though the text_summary_or_trimmed formatter makes more
19 // sense for that field type.
20 'text_trimmed' => array(
21 'label' => t('Trimmed'),
22 'field types' => array('text', 'text_long', 'text_with_summary'),
25 // The 'summary or trimmed' field formatter for text_with_summary
26 // fields displays returns the summary element of the field or, if
27 // the summary is empty, the trimmed version of the full element
29 'text_summary_or_trimmed' => array(
30 'label' => t('Summary or trimmed'),
31 'field types' => array('text_with_summary'),