Jump to content

Recommended Posts

Posted

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!? 

 

 

 

Posted

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...