I understand that if I create a paint and process function within my edit_interface_screen_details.xml file, I can then use arguments for that function to gather asset information, e.g:
function myFunction(My_Asset $asset) { echo $asset->id; }
This would return the ID of the current asset. This does work perfectly, if I define that function within my XML file as a process function.
BUT, what if I don't want to define new functions for a field, but still return asset information from the args of a function?
So, say I wanted to create a new function in my asset_edit_fns.inc file:
function myNewFunction(My_Asset $asset) { echo $asset->id; }
Since this function is not defined in the XML file, I get a php error telling me that the argument passed must be an instance of my asset type and none was given.
How can I do this?
Thanks, and if I have not been clear, please let me know. :)