Eduardo Rosa
Eduardo Rosa

Reputation: 139

Can I have hooks in a Joomla component? How?

I need to add a hook in onUserAfterDelete to when the admin deletes an user his customer info (managed by my component) goes away too.

How can I do that? Where I put the function?

Thanks a lot!

Upvotes: 1

Views: 315

Answers (1)

Valentin Despa
Valentin Despa

Reputation: 42582

Basically you need to create a plugin, which will be independent of the component itself.

You need:

  • manifest file
  • plugin itself as a .php file - here you will implement the method onUserAfterDelete.

Some code to start with is already in another related answer.

Upvotes: 1

Related Questions