Jump to content

new tuts+ tutorial beginners module writing


benbyf
 Share

Recommended Posts

Thanks for writing this. It's surely a place where the current docs are a bit lacking in details.

You could clarify a bit more that the hooked function (___save()) does need to have those three underscores, whereas the function executed by the hook (helloMessage()) does not (but can). Also getModule() is not really often used in processwire's docs, I'd rather use $modules->get('FrontEndRender') and even this would work $modules->FrontEndRender

  • Like 2
Link to comment
Share on other sites

6 hours ago, LostKobrakai said:

Thanks for writing this. I'd surely a place where the current docs are a bit lacking in details.

You could clarify a bit more that the hooked function (___save()) does need to have those three underscores, whereas the function executed by the hook (helloMessage()) does not (but can). Also getModule() is not really often used in processwire's docs, I'd rather use $modules->get('FrontEndRender') and even this would work $modules->FrontEndRender

Thanks! Would you mind adding this in brief as a comment to the tutorial? I'm sure it'll be useful to people.

  • Like 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...