Well, the subject is a bit general, though I have almost only one example in mind at the time, so I'll obviously ask about that, if you have more/others feel free to add.
createList and the callbacks to count/list things.
At the moment we do that in two (main, because I think there are more) different ways:
1) have a list_something and list_[num|count]something in the controller that are in fact wrapper for a function in a subs files,
2) directly call the function in the subs file (including the file using createList or just before that).
So, what's our "favourite" approach?
From what I've been told
'get_items' => array(
'function' => array($this, 'list_loadSomeCount'),
then
public function list_loadSomeCount($all, $type)
{
return countSomeCount($all, $type);
}
Is the preferred way, yeah that first call can simply be the old 'function' => countSomeCount() as well but its less flexible.
Good! :D
/me wonders how many should be rewritten then. O:-)