Give the gift of Drupal. All merchandise is 50% off through 2016.
Now that widgets are in good shape, time to start on formatters !
Core issue used for testbot runs (until we have a patch ready to push for review in the wild):
I extracted the code I had in field-plugins-yched, and adapted it to match the current design of the widgets code.
It lives in the field-plugins-formatters-1785748 branch.
The FieldInstance::getFormatter() method is a little more involved than getWidget(), since an $instance holds several formetters, and because of nice things like field_view_field($arbitrary_display_settings), and $display['type'] = 'hidden'.
Also, the prepareView() method being 'multiple' (acts on a array of $entities) adds some fun logic.
Only text formatters are migrated for now. A legacy layer, quite similar to the one we put for widgets, catches the other ones.
To match the current state of widgets, we should also migrate number formatters and test formatters.
PASSED: [[SimpleTest]]: [MySQL] 49,343 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 42,164 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 42,285 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 42,288 pass(es). View