Extension class

The extension class is a normal PHP class extended from baseModule.

 

You need to create a extension class when you want to do some dynamic stuff, like Plugin output, custom windows, manipulate the generated HTML or something like this.

 

inc/modules/<extensionKey>/<extensionKey>.class.php

 

Please note, that the file path have to be exactly this scheme.

 

If you need more than one class in your extension then please create another classes following this scheme:

 

inc/modules/<extensionKey>/<extensionKey>_<anotherClassName>.class.php

 

or in camelcase:

 

inc/modules/<extensionKey>/<extensionKey><AnotherClassName>.class.php


or in other words: Please make sure that your class names are equal.

 

Example extension class
<?php

class myExtensionKey extend baseModule {

    public function myPluginOne( $pParameters ){
      
        return 'Hello World!';
    }

    public function myPluginTwo( $pParameters ){

        $items = dbTableFetch('myExtensionKey_items', 'id > 2');
        tAssign( 'items', $items );

        return tFetch('myExtensionKey/pluginTwo/' .
                       $pParameters['template'] . '.tpl');
    }

}

?>