ez projects / nxc_extensions
| UNIX name | Owner | Status | Version | Compatible with |
|---|---|---|---|---|
| nxc_extensions | Serhey Dolgushev | stable | N/A | 4x |
After nxc_extensions activation, left menu template in setup tab will be overrided and "Extensions" link will link to nxc_extensions/extensions (not setup/extensions), but you still can use setup/extensions if you wish.At nxc_extensions/extensions view there are a list of extensions, and now you can drag them and change their order. If you didn`t activate nxc_mootols extensions, there are an order input for each extenson, and you can fill it with integer numbers. Extensions with the biggest order will be at the bottom of extensions list. Extensions which are at the bottom are included last, so they can override settings of previously extensions.
There are a couple of test extensions in the archive:
You can investigate them. But i will try to explain how it works: you should create settings.php file in the root directory of extensions (for example let it be test_extension). So you get <path_to_ez_publish_root>/extension/test_extension/settings.php. This file should contain a declaration of class which extends nxcExtensionSettings (this one is available at <path_to_ez_publish_root>/extension/nxc_extensions/classes/nxcextensionsettings.php). The class name should be like <extension_name>Settings. So we get the settings file:
<?php class test_extensionSettings extends nxcExtensionSettings { // default order of current extension public $defaultOrder = 20; // array of extensions that affect the current (you can`t activate current extension, if at least on of them isn`t activated) public $dependencies = array( 'test_extension_2', 'test_extension_3' ); public function activate() { // here you can put any php code which will be executed when extension will be installed eZDebug::writeDebug( 'Extension ' . $this->name . ' activated' ); } public function deactivate() { // here you can put any php code which will be executed when extension will be uninstalled eZDebug::writeDebug( 'Extension ' . $this->name . ' deactivated' ); } } ?>
You should notice: when you are disabling any extension, all other extensions which depend on current, will be disabled automatically