Customizing

From Cloudrexx Development Wiki
(Redirected from Development Customizings)
Jump to: navigation, search

This article shows how customizings can be done in Contrexx 3+ versions.

Note: See article covering version 5

Basic

Generally all files can be copied to the customizing directory in due consideration of the folder structure.

So a whole shop module could be copied to the folder /customizing/modules and the shop will still work. Requirements for a working Customizing are:

Requirements

  • Customizing-folder has to be defined (default is /customizing)
  • Customizings have to be activated (default is deactivated, option "Customizing" under "Global Configuration" - "Other configuration options" in Contrexx administration)
  • The file is a PHP file or will be loaded from the template system or from a JS class
  • The file will not be called directly (e.g. /index.php, /cadmin/index.php, /core/License/versioncheck.php, and so on)
  • The file has to be in the same folder (from /modules/shop/index.class.php to e.g. /customizing/modules/shop/index.class.php)

Constraints

This feature does not work for these cases:

  • Javascript files included in template files (can be loaded with JS::activate())
  • Directly called files (index.php, and so on)
  • Manually included php files (via require(_once) or include(_once)) without \Env::get('ClassLoader')->loadFile($path);
  • Images and other resources (can be included on php side. The following method will return the absolute path to the requested file: \Env::get('ClassLoader')->getFilePath($path);)

See the ClassLoader article for detailed information about ClassLoaders.