I have a CurriculumDate object on a ComplexTable field. One of its components is a has_many with KeynoteSpeakers. Users choose any number of keynote speakers from checkboxes in the popup, and it works great.
But on the table, I'd like the list of selected keynote speakers to display in a comma-separated list. I tried $table->setFieldFormatting(array('KeynoteSpeakers' => '$MyCommaFunction')), but it looks like that isn't designed to take functions as variables. When I did $ID, it did give the id of the CurriculumDate, however.
I've tried a number of things. My latest hack is to use fieldCasting to cast the KeynoteSpeakers as Enum, and i've hacked the Enum fieldtype to include a function "toCSVList" that looks like this:
return implode(', ', $this->enumValues(false));
not so hot, though, and barely works.