Upgrade safe customization

generatePdf and formLettter are an entry points. They are defined in include/MVC/Controller/entry_point_registry.php. So in order to make an upgrade safe changes you need to create a file for each entry point in custom/Extension/application/Ext/EntryPointRegistry/

generatePdf.php

<?php
$entry_point_registry['generatePdf'] = array(
    'file' => 'custom/modules/AOS_PDF_Templates/generatePdf.php',
    'auth' => true,
);

formLetter.php

<?php
$entry_point_registry['formLetter'] = array(
    'file' => 'custom/modules/AOS_PDF_Templates/formLetterPdf.php',
    'auth' => true,
);

This will allow you to change the path of the files.

The export_utils are being used by export.php - which is also a entry point. So if you wish to change the export function you will need to create a custom version of the export.php file and then replace the require_once(β€˜include/export_utils.php’); statement with location of your file. Then add an other file to custom/Extension/application/Ext/EntryPointRegistry/

<?php
$entry_point_registry['export'] = array(
    'file' => 'custom/export.php',
    'auth' => true,
);

Once you have defined the custom entry points you will need to reset your file permission (if you are using Linux or Mac) and then run a repair and rebuild.

2 Likes