DBAController event
Bleistivt
Moderator
Hi everyone,
I have a plugin which stores counts in various tables and I would like to add the option to recalculate these with dba/counts.
How do I hook into that action? Is this even possible for plugins? I couldn't find a plugin, that does that yet.
Thanks
0
Comments
That's actually how even the default counts are added - by a hook in the Vanilla application. See
DbaController_CountJobs_Handlerinapplications/vanilla/settings/class.hooks.php.I wrote a patch for the tagging plugin that does this:
https://github.com/hgtonight/Garden/commit/e6d0ff83efdc7b236241e0486c2825b1d413d5f3
The key is you have to have a method named
Countson the appropriate model for the hook to work.Thats exactly what I was looking for!
I had already prepared a Query but then I saw
DBAModel::GetCountSQLwhich made it even easier.