This is the reference for Hooks explaining all the available hooks of the Contao core and their parameters. The examples in this reference implement Hooks using Service Annotation and Invokable Services. These examples will work out of the box within a Contao 4.9+ installation.
However, if you need to implement a Hook for Contao 4.4, you still need to use the
PHP Array Configuration. In case you want to use an invokable
service here as well, you can still reference the
// app/Resources/contao/config/config.php use App\EventListener\GetArticlesListener; $GLOBALS['TL_HOOKS']['getArticles'] = [GetArticlesListener::class, '__invoke'];