Custom functions to replace AG internal functions

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Custom functions to replace AG internal functions

Post by onoehring » 2021-03-16 14:06

Hi Ahmed,

this is a repost from viewtopic.php?p=16829#p16827 - but I think it has a valid place in the feature suggestions.

I just red the blog post you mentioned ( https://bigprof.com/blog/appgini/custom ... dmin-area/ ). Wouldn't it be much easier to check for custom functions first and use AG internal functions if no custom function exists?
This way the developer would be able to create his functions in e.g. /custom (or /hooks/custom) with the same filename you are using e.g. incfunctions.php. You go ahead and include these files first and the original AG files afterwards with something like this

Code: Select all

if (!function_exists('getLoggedInUser')) {
    function getLoggedInUser{
         ....
    }
}
I think this approach is for example used in the CMS Concrete5 (https://Concrete5.org) where all original files to into a different directory than custom files.

Olaf

hernan
Posts: 26
Joined: 2020-06-22 18:56

Re: Custom functions to replace AG internal functions

Post by hernan » 2021-04-15 22:10

I agree, this would be a very nice feature.

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Custom functions to replace AG internal functions

Post by a.gneady » 2021-04-22 15:20

Thanks for the suggestion. I plan to move all functions into class methods in future releases. This would make it much easier to extend the classes and defined your own versions of functions you wish to overwrite.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

Post Reply