[TYPO3-shop] Hook for own markers
Tapio Markula
tapio.markula at atwebteam.com
Wed Mar 21 17:17:14 CET 2007
Franz Holzinger kirjoitti:
> Hello Tapio,
>
>> It would be nice to create hook for own markers
>> $this->globalMarkerarray could be easily extended
>> for example own language labels.
>
>
> // Call all addURLMarkers hooks at the end of this method
> if (is_array
> ($TYPO3_CONF_VARS['EXTCONF'][TT_PRODUCTS_EXTkey]['addGlobalMarkers'])) {
> foreach
> ($TYPO3_CONF_VARS['EXTCONF'][TT_PRODUCTS_EXTkey]['addGlobalMarkers'] as
> $classRef) {
> $hookObj= &t3lib_div::getUserObj($classRef);
> if (method_exists($hookObj, 'addGlobalMarkers')) {
> $hookObj->addGlobalMarkers($markerArray);
> }
> }
> }
>
>
> This will be added with the next upload of 2.5.2
But if you put that before
return $markerArray
}
how the hook could actually change the array $markerArray?
Should it be rather
if (method_exists($hookObj, 'addGlobalMarkers')) {
$markerArray=$hookObj->addGlobalMarkers($markerArray);
}
and in the end is
return $markerArray;
that returns changed $markerArray.
More information about the TYPO3-project-tt-products
mailing list