[TYPO3-core] RFC #16177: Add DB structure update pre-processing hook in EM

Franz Holzinger franz at ttproducts.de
Tue Nov 2 09:40:42 CET 2010


Le 02/11/2010 08:37, Ernesto Baschny [cron IT] a écrit :
>> (...)
>> And another proposal: Add the extension key to the hook. In most cases
>> you will write a hook only for one or very few extensions. The hook
>> shall not be called for other extensions.
>>
>> foreach
>>
> ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/mod/tools/em/index.php']['checkDBupdates'][$extKey])
>> as $classData) {
>
> Probably the only implementation of that hook will be DBAL. And DBAL
> needs to see all extensions being updated in the EM and not dbal itself.
> So I see no use in restricting it like you suggest.
>
> An extension cannot hook itself in its "own" processing anyway, because
> its ext_localconf.php won't be loaded before the extension is fully
> installed.

I also need the such a hook to add one more entry to the 
static_template. I want to insert one record from an other extension 
called 'mastertemplate'. The problem is that the 
ext_tables_static+adt.sql are not executed when the extension is 
installed, because it does not create the table static_template.

The object $hookObject should be passed. This saves a new creation of it 
in the hook.

$preprocessContent = $hookObject->preprocessDBupdates($extKey, $extInfo, 
$diff, $instObj, $this);


- Franz


More information about the TYPO3-team-core mailing list