[Typo3-dev] scan code for hook

Robert Lemke rl at robertlemke.de
Tue Aug 31 14:04:31 CEST 2004


Hi Sylvain,

(it seems like I'm only responding to your e-mails today ;-)

Sylvain Viart wrote:
>
http://typo3.org/documentation/document-library/doc_core_api/Hook_configuration/
> Does someone have a tool for scanning TYPO3 source code to find hook
> position ?

No, you can't have a tool for that. But all the hooks I created have a
comment which start with 

 // Hook: 

followed by the hook's name. So you can easily run a search over all files.
However, I don't think that this is what you are looking for. The point is,
if you ask something like "Is there a hook entry point nearby the BE
interface generation code, where I should start to insert some coding" then
you are not ready for requesting a hook yet.

The way to go is:

- first find out where in the core the things are done which you might want
  to take influence on or change
- search the surrounding code for hooks
- if there is no hook, ask someone to create one by writing an email
including a) a good reason why this is also useful for others, b) an
explanation why you cannot do it without the hook and c) a ready-made code
snippet for a new hook which just has to be inserted in the core.
 
BTW, have you read the document "How to use existing hooks ..." [1]? I'm
sorry that's not published yet on typo3.org, but it will be in the near
future.

[1] http://robertlemke.de/de/typo3/hooks/index.html
-- 
robert





More information about the TYPO3-dev mailing list