[TYPO3-dev] Determine which table belongs to with extension key

Oliver Hader oh at inpublica.de
Mon Jan 29 10:46:43 CET 2007


Martin Kutschker wrote:
>> is there a function that tells me the extension key of a table?
>> e.g. table "tx_myextension_data" -> "my_extension"
> 
> No. And how could that be?
> 
> Masi
> 
> PS: What dirty hack are you planning to need such an info?

In TYPO3 properties could be set on different places, e.g. via
ext_conf_template.txt and these information are stored in
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][<extKey>].

Anonther possibility could be a direct assignment via TCA or TSconfig to
the table directly. But there might be an other extension ("worker")
that doesn't know much about the first extension ("my_extension") but
has to perform actions, depending on the TSconfig or extConf settings.

t3lib_install offers some functions to parse ext_tables.sql but this
could take some time if there are many extensions.

It's not possible to use string comparison because the table name
"tx_myextension_data" could be part of extension "my_extension" or
"myextension".


olly
-- 
Oliver Hader
http://inpublica.de/




More information about the TYPO3-dev mailing list