Can I pass data from action function to getSessionActivityDetailsForList ?

cmpe

Active member
I have custom ControllerPublic class that extends XenForo_ControllerPublic_Abstract and within it, I have various actionXYZ functions.

Is there a way to pass data from within one of the actionXYZ functions to the getSessionActivityDetailsForList function?

I have all the data I need in the action function but can't seem to be able to pass it off to the $activities array for getSessionActivityDetailsForList.
 
Look at ControllerPublic/Thread.php and how the data is built in it's getSessionActivityDetailsForList.
 
Look at ControllerPublic/Thread.php and how the data is built in it's getSessionActivityDetailsForList.
I did look at this but because I already queried the DB in my action function to retrieve the data I want to show in the activity list, I didn't want to have to call it again. :confused:
 
The short answer is that you need to. getSessionActivityDetailsForList isn't called in the same context as your action. It only has access to basic input to identify the content in question.
 
The short answer is that you need to. getSessionActivityDetailsForList isn't called in the same context as your action. It only has access to basic input to identify the content in question.
Thanks Mike. I was actually dreaming about xenforo code last night just because I've been trying to figure this out. :D

Makes sense, since the function is called statically and the action functions are non-static.

So I guess re-working the problem a little bit, is there a way I can add to the $activities parameter somewhere so that by the time getSessionActivityDetailsForList is called, I'll have the data available in that variable of the function?

Thanks!
 
Back
Top Bottom