Developer Notes

Starting with v7.4, several code modifications have been made in order to help mod developers integrate custom modifications and/or themes easier.

To achieve this, certain hooks have been added so that none of the stock files will need to be edited anymore. All custom code modifications can now be done by overriding or extending files – as per the table below:

Classes Yes
View Files Yes
Controllers Yes Yes
PHP Lang Files * Yes
Navigation XML Files Yes
Module Config Files Yes

* Not yet available. To be implemented in V7.5.

Detailed Information

Most modified files, excepting theme specific view files, will be added in a newly created /mods/ folder, and will be automatically parsed by the software. A file in the /mods/ folder will take precedence over its counterpart in one of the stock folders.

1. Classes

All classes can be overridden, by copying the original class in the exact same folder as in stock but in the /mods/ folder, for example the parsing order will be:
/mods/library/Ppb/Model/Elements/Listing.php overrides

The newly overridden class will be recognized by the software as the class to use, and its corresponding stock file will not be used unless the modified class is removed.

2. View Files

View files, including view partials, will work similar to the rule for classes, however theme specific view files will take precedence over files in the /mods/ folder or stock view files. For example:
/themes/your-theme/members/summary/index.phtml overrides
/mods/module/Members/view/members/summary/index.phtml which overrides

Example for view partials (applies to navigation and form partials as well):
/themes/your-theme/partials/pagination.phtml overrides
/mods/module/App/view/partials/pagination.phtml which overrides

3. Controllers

Controllers can be overridden just like any class, explained at paragraph #1, but they can also be extended. To achieve this, the extended controller class will need to be named as Extended extends . For example:
/mods/module/App/src/App/Controller/PagesExtended.php will extend:
/module/App/src/App/Controller/Pages.php and the class will be defined as:
class PagesExtended extends Pages

4. PHP Lang Files

* Not yet available. To be implemented in V7.5.

5. Navigation XML Files

Navigation XML files can be extended by simply adding data to the original xml structure. You can also override data from the original structure. In order to extend a navigation file, the same file needs to be created in the /mods/ folder, for example:
/mods/module/App/config/data/navigation/navigation.xml will extend:

Example - Adding a link to the header menu

In the newly created extended navigation file, add:


6. Module Config Files

Module config files can be extended by simply replicating the array structure, it works identically to how the navigation files are extended.

Example - Adding a new route
return array(
    'routes' => array(

        'app-custom-sample-route' => array(
                'controller' => 'custom',
                'action'     => 'sample',