Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Packages: extensions, Composer and bundles

The extension is Exponential's unit of code, like a Symfony bundle, a Laravel package, a Django app or a Rails engine - its directory layout, metadata, activation globally or per siteaccess, loading order, installing it…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/web-framework-developers/packages-extensions-and-composer.md

On this page

Packages: extensions, Composer and bundles

This page is for developers who structure code as bundles, packages, apps or engines. In Exponential that unit is the extension: a directory in extension/<name>/ that can carry modules, classes, templates, settings, datatypes, workflow event types, cronjob parts, commands, translations, schema files and tests. Extensions are distributed as Composer packages (Anatomy of an extension).

Contents

  1. The directory layout
  2. Metadata
  3. Activation and order
  4. Composer
  5. Compared with other frameworks

The directory layout

DirectoryHoldsRegistered by
modules/<module>/module.php, views, function_definition.phpmodule.ini [ModuleSettings] ExtensionRepositories[], ModuleList[]
classes/PHP classesphp bin/php/ezpgenerateautoloads.php -e
autoloads/template operator registrationsite.ini [TemplateSettings] ExtensionAutoloadPath[]
design/<design>/templates, overrides, stylesheets, scripts, imagesdesign.ini [ExtensionSettings] DesignExtensions[]
settings/*.ini.append.php; siteaccess/<name>/ per siteaccessbeing active
datatypes/, eventtypes/event/field types, workflow event typescontent.ini, workflow.ini
cronjobs/cronjob scriptscronjob.ini
bin/php/commands, found as ext:<ext>:<name>nothing
share/, sql/<engine>/schema and seed datayour install command
translations/<locale>/interface translationssite.ini [RegionalSettings] TranslationExtensions[]
tests/PHPUnit testsyour CI

Metadata

FileContent
extension.xml<metadata> with name, version, copyright, license, info URL; <dependencies> on other extensions
ezinfo.phpclass <extension>Info with a static info() (Name, Version, Copyright, License, Info_url)
composer.jsonthe Composer package, type ezpublish-legacy-extension, with extra.ezpublish-legacy-extension-name

The about page (/ezinfo/about) reads extension.xml first, so both version fields must agree (Versions and releases).

Activation and order

  • site.ini [ExtensionSettings] ActiveExtensions[] activates an extension for every siteaccess; ActiveAccessExtensions[] in a siteaccess's settings activates it there only.
  • Order matters: the order of ActiveExtensions decides which extension's settings, templates and design files win when two provide the same thing; with ExtensionOrdering=enabled the declared dependencies decide most of the real loading order (Extension loading order).
  • Setup > Extensions shows and switches them (Extensions guide).
  • After activating: regenerate autoloads, clear caches, deploy.

Composer

composer require yourvendor/expdemo:~1.0.0
php bin/php/ezpgenerateautoloads.php -e

The package lands in extension/<name>, the name given by extra.ezpublish-legacy-extension-name. Versions come from Git tags; a published tag is permanent (Composer packages and Packagist). autoload.php loads Composer's autoloader, so ordinary libraries required by your extension's composer.json are available to its classes.

Content classes and demo content travel separately, as packages (.ezpkg) (Migrations and seed data).

Compared with other frameworks

FrameworkUnitRegistered byExponential
Symfonybundleconfig/bundles.phpActiveExtensions[]
Laravelpackage with a service providerpackage discoveryComposer plus ActiveExtensions[]
DjangoappINSTALLED_APPSActiveExtensions[]
Railsengine, gemGemfile, mountComposer, ActiveExtensions[], modules
Springstarterauto-configurationsettings in the extension

Per-siteaccess activation has no common equivalent in other frameworks: one installation can run an extension on one site and not on another.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x