I'm trying to keep the generated code from AppGini as clean as possible. I made a lot of /hooks/ customization and all, but I needed to modify some functions in the generated code.
I followed the recipe from Genedy regarding "Overwriting AppGini functions...https://bigprof.com/blog/appgini/custom ... dmin-area/ " and I managed to make it work!
But now, instead of replacing a function, I would like to add a function into an AppGini automatically generated file.
For example I want to add a custom function to incCommon.php file.
I tried to modify the code to replace functions, but my PHP knowledge is not enough, so I don't know how to "append" something to a php file from a php script.
So I came here looking for enligthnment!
- First: does anyone know how this can be done, to attach a function to a php file from a php script?
- Second: does it makes sense to wanting to add a function to incCommon.php, or is there other way to make a custom function accesible from incCommon.php without adding the function into the file but keeping it in a separate file?
Background information:
Currently working with 5.95 revision 1136, because since I'm changing things, let's do it with the latest version...
I'm trying to make my app as "future proof" as possible, and to have the ability to quickly create new fields and tables from AppGini, regenerate code and not having to spend hours manually reapplying all the modifications made to the code outside hooks.
Unfortunately the initial code was not created by me, it is quite messy and I just have to maintain the running application into the company I work for. And everytime a user asks me for a new functionality, or even a new field... i cry in despair thinking of the headaches that modification will cause due to all the customization of AppGini files
So, any help will be greatly appreciated!
Have a nice day!