[TYPO3-dev] Change calling order of hooks

Christian Weiske christian.weiske at netresearch.de
Tue Oct 2 17:51:51 CEST 2012


Hi,


To post-process javascript includes, I've registered a hook for 
> $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']
> ['t3lib/class.t3lib_pagerenderer.php']['render-preProcess']

Now we're using some more extensions, e.g. nr_cdn, which also hook into
there and convert the Javascript URLs to absolute URLs on a CDN.

I have to make sure that my new hook is called *after* all the
other "render-preProcess" hooks. How can I do that?


The core API documentation[1] states
> The hooks can even rearrange the calling order if they dare.
but doesn't tell how.

All the hooks are processed in a foreach($hooks as $hook) loop, and when
my hook gets called, it cannot change $hooks anymore - foreach() would
not care about it.

What can I do?



[1]
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.3.2/view/3/4/

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-= Geeking around in the name of science since 1982 =-




More information about the TYPO3-dev mailing list