distill
distill copied to clipboard
Allow for settings to be passed when calling setAllFields
It would be useful to pass field settings when using setAllFields
. The ability to exclude certain fields would also be handy as well.
@tappleby good ideas!
Excluding certain fields is pretty easy to do. Passing field settings into processors is a bit more complicated. I've thought of a few different ways to do that. The one I like most is something similar to this:
$distiller->setAllFields(array(
'my_field_name' => array(
'link' => TRUE,
),
));
The first parameter would take an array of subarrays keyed by field name. I'll see if I have time to build this out next week.
Thats pretty much what I ended up doing here - https://github.com/tappleby/distill/compare/09aa7675db091f15872d36ac87a32033d34c9a46...tappleby:b5f7de8ec6fa2357caa4b244ea8aaa8554d0f3da
I also added an argument to restrict the fields.