Automated field formatter settings summaries in Drupal

Drupal developers [hopefully] find themselves writing "field formatters" fairly often. These pieces of code add ways to display the data stored in fields, so having an arsenal of formatters can come in handy.

Making formatters is often straightforward, but some of the work gets repetitive and tedious. The snippet below should allow you to at least get up to speed more quickly, if not make the "settings summary" a worry of the past.