Suite8 - ModuleNameMapper for custom modules

Hey @Bungle,

I’ve searched the code for the warning message. It comes from: public/legacy/include/portability/ModuleNameMapper.php

From there, by reading the code, I was able to find out that there is a configuration file that maps the legacy module names to front end names.

File: public/legacy/include/portability/module_name_map.php

sample from the file:

    'Prospects' => [
        'frontend' => 'prospects',
        'core' => 'Prospects'
    ],
    'ProspectLists' => [
        'frontend' => 'prospect-lists',
        'core' => 'ProspectLists'
    ],
    'Documents' => [
        'frontend' => 'documents',
        'core' => 'Documents'
    ],

At the end of the file it has an import for custom files, using Suite7’s extension mechanism:


if (file_exists('custom/application/Ext/ModuleNameMap/module_name_map.ext.php')) {
    /* @noinspection PhpIncludeInspection */
    include('custom/application/Ext/ModuleNameMap/module_name_map.ext.php');
}

I did a quick search on the forum for module_name_map and I think you can extend $module_name_map in a upgrade safe way, by doing:

See the following posts:

1 Like