Navigation
eZ Documentation Center
 

This is outdated documentation made for eZ Publish Platform 5.2. It is being moved into the eZ Publish 5.x documentation, so please go there for most up-to-date documentation.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

eZ Publish 5.2 has a strong focus on backwards compatibility and thus lets you reuse code you might have written for 4.x, including templates and modules.

...

Running legacy code

eZ Publish 5.2 still relies on the legacy kernel (from 4.x) and runs it when needed inside an isolated PHP closure, making it sandboxedThis is available for your use as well making it possible to run some PHP code inside that sandbox through the runCallback() method.

...

Any route that is not declared in eZ Publish 5.2 in an included routing.yml and that is not a valid UrlAlias will automatically fallback to eZ Publish legacy (including admin interface).

...

Code Block
languagehtml/xml
titleTemplate legacy module sub-request
{{ render( url( 'ez_legacy', {'module_uri': '/content/view/sitemap/2'} ) ) }}

 

Using eZ Publish 5.2 and Symfony features in Legacy

If for some reason you need to develop a legacy module and access to eZ Publish 5 / Symfony features (i.e. when developing an extension for admin interface), you'll be happy to know that you actually have access to all services registered in the whole framework, including bundles, through the service container.

...

The command will need to be executed from eZ Publish's 5.2 root, and the path to the desired script must exist in the ezpublish_legacy folder.
Here's a usage example:

...