I have custom plugin and I want to do something when my plugin save in admin panel of Joomla 4 . How can I override save method in plugin ?
1 Answer
You could create a Content plugin and use the onContentBeforeSave
method like Robbie Jackson suggested.
If for some unknown reason it does not work, you could always write a system plugin and use onAfterInitialise
or onAfterRoute
and do something there. Only use this when you cannot use anything else.
Do you use an IDE like PHPStorm or VisualStudio? If you combine it with XDebug, you could set break points, and step through Joomla's code to find the places that you could trigger to do something with your code.