Developer documentation for the Contao Open Source CMS Download Latest version from GitHub
Hooks work similar to the callback functions of the Data Container Array. You can register one or more functions for a certain event and when the event is triggered, the callback functions are executed. Hooks allow you to add custom functionality to the core.
// config.php $GLOBALS['TL_HOOKS']['getImage'][] = array('MyClass', 'myGetImage'); // MyClass.php public function myGetImage($image, $width, $height, $mode, $strCacheName, $objFile, $target) { return MyImage::generateThumbnail($image, $widht, $height, $mode); }