evanmcd Posted September 25, 2012 Share Posted September 25, 2012 Hi all, Strange problem I'm running up against here - just trying to use $sanitizer->name() on a string I want to end up as an HTML class value. In my PW template, if I call it in the main scope of the page, it's fine. If I call it inside a function, I get a call to a non-object error. OK, so just for kicks I passed $sanitizer into the function, but still get the same error. Then, I figure OK I'll create a module that manages the markup I'm creating (seems like a good thing to do anyway). But, much to my dismay, I get the same error when calling from within the module. How do I properly call it in any other scope other than the global scope of a template? Or am I missing something much more simple? Thanks. Link to comment Share on other sites More sharing options...
Soma Posted September 25, 2012 Share Posted September 25, 2012 wire("sanitizer")->name() I'd guess. 1 Link to comment Share on other sites More sharing options...
evanmcd Posted September 25, 2012 Author Share Posted September 25, 2012 Of course! I always forget to try using that method. Thanks Soma. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now