I am new to civicrm.

I have created a module; say com.ex.myextention. and created a page its working fine.

But in my module where I have to write a hook and how to ensure the defined hook is working.

1 Answer 1


"To implement a hook, add a function to the module's main .php file created earlier with civix generate:module" - the developer guide.

However, if you've created your own page class, you may not need to use a hook at all, since you have complete control of the code.

If I haven't answered your question, please update your question with a bit more detail about what you're trying to do.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.