[TYPO3-dev] Can ext_tables.php include hooks?
Tapio Markula
tapio.markula at atwebteam.com
Fri Apr 6 14:12:06 CEST 2007
Ingo Renner kirjoitti:
> Tapio Markula wrote:
>> Hi
>>
>> Just simple question:
>> Can ext_tables.php include hooks?
>
>
> sure, just like any other php file
>
> Ingo
Ok. Because of some request of Kasper's topapps
I made from it configurable version and I thought to add
a hook in the middle
$tm_shared_libConf =
unserialize($TYPO3_CONF_VARS['EXT']['extConf']['tm_shared_lib']);
if ($tm_shared_libConf['enable.']['new_topapps']) {
$topAppsList=t3lib_div::trimExplode(',',strtolower($tm_shared_libConf['enable.']['topapps_list']),1);
if(is_array($topAppsList))
$topAppsList = array_flip($topAppsList);
if(isset($topAppsList['menu']))
t3lib_extMgm::addTopApp('xMOD_txtopapps_menu',t3lib_extMgm::extPath($_EXTKEY).'menu/',FALSE,array('leftAlign'
=> TRUE, 'simpleContainer' => TRUE));
...
if (is_array
($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][TM_SHARED_LIB_EXTkey]['addTopps']))
{
foreach
($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][TM_SHARED_LIB_EXTkey]['addTopps']
as $classRef) {
$hookObj= &t3lib_div::getUserObj($classRef);
if (method_exists($hookObj, 'addTopps'))
$shortcutItems .= $hookObj->addTopps();
}
unset($classRef,$hookObj);
}
if(isset($topAppsList['shortcuts']))
t3lib_extMgm::addTopApp('xMOD_txtopapps_shortcuts',t3lib_extMgm::extPath($_EXTKEY).'shortcuts/',TRUE,array('leftAlign'
=> TRUE));
...
In the middle because of position issues.
Some of them include also hooks.
More information about the TYPO3-dev
mailing list