[Typo3-doc] Hook Compendium

Sebastian Kurfuerst sebastian at garbage-group.de
Sat Apr 16 20:00:03 CEST 2005


Hi,
> "Hook Compendium"
> in which all Hooks in the Core are listed and there is example code how 
> to Hook into, using the two different Hook-Types.
I think this is quite easily possible, you could try a "grep" statement 
like this:
  grep SC_OPTIONS * --recursive
This echoes around 190 lines, so there might be around 190 hooks in the 
core (of course this is a rather rough estimate).

> It should also get explained what the Hook is intended for and how the
> variables get passed (by reference, by value) etc.
All hooks use the same principles. The variables are always passed by 
reference, as long as the t3lib_div::callUserFunction is used.

> There is a nice documentation about Hooks from Robert Lemke at:
> http://www.robertlemke.de/31/
> which could be integrated.
> What do you think ? Is such a document needed ?
I think this document (function examples for *all* hooks) would produce 
quite a lot of overhead, and the uses for it might be quite limited... I 
think Robert's document describes everything quite well, what are the 
cases which are not described?

Of course, now you have to "dig" what happens in which core class and 
which hook could be used to modify that, but when using hooks, you need 
to understand the things going on around the hook anyways I think. IMO, 
this limits the benefit of such a document. Normally you need the other 
way round - which hook to use to archive that and that? And such a 
document would be really difficult to structure I imagine.


Greets,
Sebastian

> I often wanted to know which hook I could use for a specific purpose. 
> Lucky that I know the main T3 classes so well now I have not many 
> problems at this time. But when I started using hooks I had quite some 
> problems finding the right hook for my intention.
> 
> 
> 
> greets,
> Bernhard



More information about the TYPO3-project-documentation mailing list