Custom Plugin that needs his own logic hook

Hi all,

I need to create a Package that, when installed through Module Loader, copies a bunch of files that realize the custom logic.
This logic also affects other modules and, more precisely, needs to create a logic_hooks.php file within the custom/modules/AOS_Products_Quotes folder.

The question is: what happens if that folder has already a logic_hooks.php file, maybe created during previous developments? I cannot override it.
Is it possible to simply merge my logic_hooks.php with the existing one during the installation (maybe through a special directive inside the manifest file) or implement other solutions to solve this problem?

Thank you.


If you add logic hooks definition in your manifest.php, it will be added to existing logic_hook files
You can find an example at


Cool! This solves my problem!

Thank you so much!

I think it will work if you use the Extensions Framework, like explained here

Yes, I know the extension framework, but I needed to make an installable package that could automatically copy (during the installation process) his own logic_hook file into an existing folder without overwriting a logic_hook file that might be already present as a consequence of previous developments.

The answer of blqt seems to be the perfect solution.