Orkun Posted October 28, 2015 Posted October 28, 2015 What is the $event variable/parameter in the Helloworld.module? What does the $event? How does it work? Are there php classes which describes $event? What are all these things doing? $event $event->arguments[0] $event->object Im sorry if this is a nooby question
LostKobrakai Posted October 28, 2015 Posted October 28, 2015 $event is the HookEvent object, that's passed into each hooked function. It holds all the information needed about the hooked function, arguments, objects, return values and so on. 2
kongondo Posted October 28, 2015 Posted October 28, 2015 Hooks... http://processwire.com/api/hooks/ 2
bernhard Posted October 28, 2015 Posted October 28, 2015 You can also do a var_dump($event); die(); in the module to see its content or use $event->return or $event->arguments if $event alone does not work 3
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