Hi,

Following the old tutorial I tried to override a module function in Contao4, following the instructions for 3 with no success.
I tried also to use the config.php, the autoload.php and autoload.ini files, but nothing happens.

In system/modules/xcustom I have config folder and ModuleMyBooknav.php, which should override ModuleBooknav core module.
In config folder I have :

AUTOLOAD.INI
register_namespaces = false
register_classes = true
register_templates = false

AUTOLOAD.PHP
<?php
ClassLoader::addClasses(array
(
'ModuleMyBooknav' => 'system/modules/xcustom/ModuleMyBooknav.php',
));

CONFIG.PHP
<?php
$GLOBALS['FE_MOD']['navigationMenu']['booknav'] = 'ModuleMyBooknav';

Where am I wrong ? If I replace 'booknav' with 'mybooknav' something appears in module list, but its class is empty and I get an error 'class not found' if I try to use it.
If I leave it like above I get no errors, but ModuleBooknav class doesn't get overridden.