This function automatically treat the field config to browse datas :
XxxxHelperForm::getItems()
But you can create a function called "getItems()" in the field type class.
It depends what you want to do. You can
- fork the 'relation' field type and override the getItems() function
- create a derived field type inherited from 'relation' (You will encounter fork problem if you create a new field type wich doesn't exist in the generated component. It is still a limitation at the moment)
- invent a new parameter in the XML form field declaration to change the behavior of your field. (Taking source from somewhere else for instance)
Another way is also to play with :
It is another cool way because you are in touch directly with the desired model. You can play with the ORM
Cook is very handly and confortable, isn't it ?