Path

ez projects / ymcextensionloader


YMC Extension Loader

UNIX name Owner Status Version Compatible with
ymcextensionloader Thomas Schieke stable 1.0 4.3
ymcExtensionLoader is an alternative concept for INI file handling in eZ Publish. It solves several known problems and also provides some enhancements that have been continuously discussed in the eZ Ecosystem

ymcExtensionLoader for eZ Publish

Overview

ymcExtensionLoader is an alternative concept for INI file handling in eZ Publish. It solves several known problems and also provides some enhancements that have been continuously discussed in the eZ Ecosystem. See for example:

To a standard eZ Publish, ymcExtensionLoader adds the following functionality:

  • Support for global override settings, limited to a specific siteaccess (useful for local development).
  • Nested extension loading: Extension can be loaded from any other extension. This makes the "ActiveAccessExtension?" setting dispensable.
  • Support for PHP autoloads using the eZ Components autoload system, thus enabling autoloads by extension, rather than having a general autoload file for all extensions.

Notes and explanations

  • ActiveExtensions are tried to be loaded before ActiveAccessExtensions. However, it makes no difference if an extension is defined for loading as Active Extension or ActiveAccessExtension. Using the ActiveExtension setting is recommended.
  • PHP autoloads can be triggered from any extension by simply putting a file autoload.php into its autoload subfolder, e.g. extension/ymcextensionloader/autoload/autoload.php.

Example

Assume three extensions called FIRST, SECOND, THIRD. The extension FIRST is activated in settings/site.ini (or in settings/override/site.ini if you just want to try out a new extension). Inside FIRST (which now is active), SECOND is activated in extension/FIRST/settings/site.ini. This will trigger loading SECOND. In its extension/SECOND/settings/site.ini THIRD can be specified for loading, and so on.

New loading hierarchy

When settings are loaded, ymcExtensionLoader looks for settings according to the following sequence (higher numbers first, so global siteaccess overrides have the highest priority):

  1. Default Settings (/settings)
  2. In ActiveExtensions? (extension/EXTENSION/settings)
  3. In ActiveAccessExtensions? (/extension/EXTENSION/settings)
  4. Default Siteaccess-Settings (/settings/siteaccess)
  5. Siteaccess in ActiveExtensions? (/extension/EXTENSION/settings/siteaccess/SITEACCESS)
  6. Siteaccess in ActiveAccessExtensions? (/extension/EXTENSION/settings/siteaccess/SITEACCESS)
  7. Global overrides (/settings/override)
  8. Global siteaccess overrides (/settings/override/sitaccess/SITEACCESS)

As stated above, it is also possible to load an additional extension via the siteaccess settings of an already activated extension.

Screenshot

YMC AG, Switzerland
YMC AG, Switzerland

No news yet.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.