LMX Posted February 12, 2021 Share Posted February 12, 2021 Does anyone know an easy way to inspect instance of an IPS class (vars/methods etc)? Basically I want to be able to print_r/var_dump/get_object_vars($classInstance) in the cloud hosted env. Example I am creating an "Add to calendar" button on event pages that will allow users to add events to their personal calendars (google, apple, outlook, etc...). This requires that I dynamically add event data. Up until now I have been looking at templates and trying to find the corresponding elements that render a given piece of data - e.g. $event->content(). There has to be a better way that is less of a stab into the dark... anyone have any thoughts!? Link to comment Share on other sites More sharing options...
CoffeeCake Posted February 12, 2021 Share Posted February 12, 2021 You might be interested in this: LMX 1 Link to comment Share on other sites More sharing options...
Nathan Explosion Posted February 12, 2021 Share Posted February 12, 2021 22 minutes ago, Paul E. said: You might be interested in this: He would be if it was available to install. Also if he wasn't on Cloud, where you can't turn on In_dev. And also because of the last paragraph of the description of the app. LMX 1 Link to comment Share on other sites More sharing options...
LMX Posted February 12, 2021 Author Share Posted February 12, 2021 Yeah it looks like this has been causing more issues that it has been solving in CIC. I appreciate you pointing it out though @Paul E.. @Nathan Explosion any other thoughts? Link to comment Share on other sites More sharing options...
CoffeeCake Posted February 12, 2021 Share Posted February 12, 2021 Oh I'm sorry, I had no idea you were on CIC. Link to comment Share on other sites More sharing options...
LMX Posted February 12, 2021 Author Share Posted February 12, 2021 Just now, Paul E. said: Oh I'm sorry, I had no idea you were on CIC. Oh no problem. Thanks again! Link to comment Share on other sites More sharing options...
bfarber Posted February 15, 2021 Share Posted February 15, 2021 It's going to be trickier on cloud where you can't access the files, but one thing you can do in templates is {{var_dump( $event );exit;}} If you use double curly brackets like above, the code is executed as PHP (there's some special shortcuts for if/foreach statements but otherwise it basically means "execute as PHP"). By editing templates and adding things like the above you should be able to print out vars in most situations. Link to comment Share on other sites More sharing options...
Recommended Posts