X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd7%2Fhook%2Ffield_formatter_info.twig;fp=vendor%2Fchi-teck%2Fdrupal-code-generator%2Ftemplates%2Fd7%2Fhook%2Ffield_formatter_info.twig;h=cdb2ef0887b57442644f27de9d1e7f097b929e84;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/field_formatter_info.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/field_formatter_info.twig new file mode 100644 index 000000000..cdb2ef088 --- /dev/null +++ b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/field_formatter_info.twig @@ -0,0 +1,34 @@ +/** + * Implements hook_field_formatter_info(). + */ +function {{ machine_name }}_field_formatter_info() { + return array( + 'text_default' => array( + 'label' => t('Default'), + 'field types' => array('text', 'text_long', 'text_with_summary'), + ), + 'text_plain' => array( + 'label' => t('Plain text'), + 'field types' => array('text', 'text_long', 'text_with_summary'), + ), + + // The text_trimmed formatter displays the trimmed version of the + // full element of the field. It is intended to be used with text + // and text_long fields. It also works with text_with_summary + // fields though the text_summary_or_trimmed formatter makes more + // sense for that field type. + 'text_trimmed' => array( + 'label' => t('Trimmed'), + 'field types' => array('text', 'text_long', 'text_with_summary'), + ), + + // The 'summary or trimmed' field formatter for text_with_summary + // fields displays returns the summary element of the field or, if + // the summary is empty, the trimmed version of the full element + // of the field. + 'text_summary_or_trimmed' => array( + 'label' => t('Summary or trimmed'), + 'field types' => array('text_with_summary'), + ), + ); +}