Hallo,
ich möchte mich mit Hooks beschäftigen und wollte testweise etwas ausprobieren.
Laut Anleitung in https://docs.contao.org/books/cookbo...in-Contao.html habe ich eine Datei system/modules/config.php erstellt:
PHP-Code:
$GLOBALS['TL_HOOKS']['executePreActions'][] = array('custom/MyCustomModuleClass', 'myExecutePreActions');
Außerdem die Klasse system/modules/custom/MyCustomModuleClass
PHP-Code:
namespace Contao;
public function myExecutePreActions($strAction)
{
if ($strAction == 'update')
{
echo "MyCustomModuleClass.myExecutePreActions.$strAction=" . $strAction . "<br>";
}
}
Offensichtlich wird aber nicht einmal die config.php ausgeführt, denn wenn ich $GLOBALS['TL_HOOKS']['executePreActions'] über anderen anderes PHP-Code ausgebe, ist es leer.
Muss ich das noch irgendwo bekanntmachen, dass es config.php überhaupt gibt? Wenn ja, wie?
Grüße
Lesezeichen