Page 1 of 1

Event SmartyPreCompile - variable with text passed by reference?

Posted: Wed Jun 25, 2008 2:32 pm
by Vin
I need some more explanation into this - sorry if this sounds dumb, but I'm really not sure.

In the help of this event, I read :
'content' - Reference to the affected content text.
Does it mean that this variable (accessible with $params['content']) isĀ  passed by reference and when I modify its contents in a UDT appended to the event, my changes will affect the variable which was used as an argument in Events::SendEvent and be stored in the database?

Re: Event SmartyPreCompile - variable with text passed by reference?

Posted: Fri Jul 04, 2008 9:54 pm
by Vin
bump

Re: Event SmartyPreCompile - variable with text passed by reference?

Posted: Sat Jul 05, 2008 2:21 pm
by calguy1000
Yes, you're passed a reference to the content object.

You can change the object, and call the Save() method to have those changes reflected in the database.