Development

Rate TYPOlight

Rate TYPOlight at Hotscripts.

TYPOlight webCMS > Development

TYPOlight development

TYPOlight can easily be extended by custom modules. Use the module creator to set up the basic file structure of your extension. Do not modify any files outside your modules directory. You can overwrite any core setting in a configuration or data container file.

If you want to add functionality to a class, please use a hook or request a new one if there is none.

Table configuration

The TYPOlight back end engine is based on the global table configuration array which consists of one or more data container arrays. Each database table relates to a particular data container array stored in the "dca" folder of a module. The DCA defines the form fields needed to edit a record in the back end.

TYPOlight API

TYPOlight is based on an MVC framework that provides libraries to handle certain tasks. The four default libraries (Config, Input, Environment and Session) are always available. If you want to use another library, you have to import it first. Here is a short example:
public function run()
{
    $this->import('Encryption');
    $this->Encryption->encrypt('Hello world');
}

Hooks

Hooks allow you to register callback functions that are called on a particular event in a specific order. Thus, you can add functionality to the core system without having to modify the source code. To add a callback function, open the configuration file of your module (config/config.php) and e.g. add the following line:
$GLOBALS['TL_HOOKS']['getSearchablePages'][] = array('News', 'getSearchablePages');