DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: dmc_hooklist

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Dominique Stender
Changed:2007-07-20T16:33:15
Author:Author Name
Email:your@email.com
Info 3:
Info 4:

EXT: dmc HookList

Extension Key: dmc_hooklist

Copyright 2007, Dominique Stender, dmc digital media center GmbH, <dst@dmc.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: dmc HookList 1

Introduction 1

What does it do? 1

Administration 1

Configuration 2

Known problems 2

To-Do list 2

Changelog 3

Introduction

What does it do?

TYPO3 provides hook-points which enable extension developers to extend or alter existing functionality of the TYPO3 core or other extensions.

The TYPO3 backend (“Tools” > “Configuration”) already offers functionality to see which ones of these hook-points are used. What is missing is a functionality to see which hook-points exist in the first place.

This is where this extension comes in. It analyzes the existing sources and displays which hook-points exist in which file and function.

Administration

The extension is installed as a backend module and is accessible through the menu on the left side of the screen (“Tools” > “HookList”).

In the function selectbox in the upper-right corner you can select where to look for hook-points. It is recommended to limit the analysis only to those parts of the sources that are currently relevant to you. Analyzing all sources might take several seconds, depending on your machine.

After you have selected the target of analysis you will be displayed with a list of files. For every file you will see every hook-point that was found.

If the hook-point resides in a class-method, it will be encapsulated in some pseudo code like this:

~/t3lib/class.t3lib_tcemain.php:
class: t3lib_TCEmain
function: clear_cache()
    $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval']
    $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']

If the hook-point resides in global scope, the display will be very similar:

~/typo3/sysext/cms/tslib/index_ts.php:
        $TYPO3_CONF_VARS['SC_OPTIONS']['tslib/index_ts.php']['preBeUser']

img-1

Configuration

No configuration required.

Known problems

Currently hook-points are found only if...

  • ...they are iterated with a foreachloop.

  • ...they reside in a file with .php extension. This is believed only to be a theoretical problem.

  • ...the syntax of the hook-point follows $TYPO3_CONF_VARS['SC_OPTIONS'][' path/to/file.php '][' name ']

    Hook-points with other nesting depths won't be found.

Not a real problem, but it might be irritating some people that some hook-points and files are listed more than once. The reason is simple: During the analysis of the sources, this extension is following symbolic links.

To-Do list

Maybe add a possibility to support custom syntaxes for hook-points.

Changelog

2007-07-20 1.0.2

- improved detection algorithm to find more hookpoints (thanks to steffen@dislabs.de)

- added a check for PHP safe_mode state before calling set_time_limit(0). (thanks to Marcus Krause)

2007-04-29 1.0.1

- removed whitespace tokens to improve hook-point recognition (thanks Sebastian Kurfürst for pointing this out)

- fixed some typo in the documentation

- added infinite runtime for the parsing process

2007-04-28: 1.0.0

Initial version.

EXT: dmc_hooklist - 3