OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Asking OJS to tell me all possible hooks?

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Asking OJS to tell me all possible hooks?

Postby rmichael » Mon Aug 04, 2008 2:28 am

Is is possible to query OJS for all known hook names, including the dynamic hooks (for example, those created for children by parents as in DAO class)?
I could do this statically, by parsing the source with a system command, but it would be hard to catch the above dynamic hooks. For example, HookRegistry::getAllKnownHooks(), similar to HookRegistry::getHooks() (which should maybe then be "getRegisteredHooks()").

I would like my plugin to present a drop-down list of hooks to the user.

Thanks!
rmichael
 
Posts: 113
Joined: Fri Mar 30, 2007 3:32 pm

Re: Asking OJS to tell me all possible hooks?

Postby asmecher » Thu Aug 07, 2008 11:45 pm

Hi Richard,

There's no way to do this at the moment -- what you might consider doing is logging all hooks called (e.g. by modifying the HookRegistry::call function) for a while, using OJS representatively, and building a list that way.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Development

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 1 guest

cron