cdb2ef0887b57442644f27de9d1e7f097b929e84
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / field_formatter_info.twig
1 /**
2  * Implements hook_field_formatter_info().
3  */
4 function {{ machine_name }}_field_formatter_info() {
5   return array(
6     'text_default' => array(
7       'label' => t('Default'),
8       'field types' => array('text', 'text_long', 'text_with_summary'),
9     ),
10     'text_plain' => array(
11       'label' => t('Plain text'),
12       'field types' => array('text', 'text_long', 'text_with_summary'),
13     ),
14
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'),
23     ),
24
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
28     // of the field.
29     'text_summary_or_trimmed' => array(
30       'label' => t('Summary or trimmed'),
31       'field types' => array('text_with_summary'),
32     ),
33   );
34 }