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

Anatomy of an extension

Every directory and file an extension can have - modules, classes, autoloads, design, settings, datatypes, event types, cronjobs, bin, share, sql, translations, doc - plus extension.xml, ezinfo.php and composer.json…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/creators/app-creators/extension-anatomy.md

On this page

Anatomy of an extension

This page is for application creators who want to know what goes where in an extension. An extension is a directory under extension/ (or an additional extension directory); the kernel finds its parts by directory names and by the settings the extension carries (Extensions).

The About page of the administration, where an extension's version and license show
The About page of the administration, where an extension's version and license show

Contents

  1. The directory layout
  2. Metadata files
  3. Activation
  4. Loading order
  5. Checklist for a new extension

The directory layout

DirectoryHoldsRegistered by
modules/<module>/module.php, view scripts, function_definition.phpmodule.ini [ModuleSettings] ExtensionRepositories[], ModuleList[]
classes/PHP classesezpgenerateautoloads.php -e writes autoload/ezp_extension.php
autoloads/template operator registration (eztemplateautoload.php)site.ini [TemplateSettings] ExtensionAutoloadPath[]
design/<design>/templates, override templates, stylesheets, images, scriptsdesign.ini [ExtensionSettings] DesignExtensions[]
settings/*.ini.append.php for every siteaccess; siteaccess/<name>/ per siteaccess; override/being active
datatypes/<name>/datatype classescontent.ini [DataTypeSettings] ExtensionDirectories[], AvailableDataTypes[]
eventtypes/event/<name>/workflow event typesworkflow.ini [EventSettings] ExtensionDirectories[], AvailableEventTypes[]
cronjobs/cronjob scriptscronjob.ini [CronjobSettings] ExtensionDirectories[] and a [CronjobPart-<name>]
bin/php/command line scriptsfound by the console as ext:<ext>:<name>
share/, sql/<engine>/database schema and datainstalled by your setup script or the package
translations/<locale>/translation.tstranslationssite.ini [RegionalSettings] TranslationExtensions[]
doc/the extension's own documentation, as Markdown (.md) in English; README.md and INSTALL.md stay on topthe help center shows it while the extension is active (Documenting an extension)
tests/PHPUnit testsyour CI (Testing applications)

The real catalogue of every extension point, with the INI line that registers it, is Setup > RAD (Extension points).

Metadata files

FileContent
extension.xml<metadata> with name, version, copyright, license, info_url; <dependencies> with <requires><extension name="..."/></requires>
ezinfo.phpclass <extension>Info with a static info() returning Name, Version, Copyright, License, Info_url
composer.jsonthe Composer package, type ezpublish-legacy-extension, license, requirements

The about page (/ezinfo/about) reads extension.xml first, so both files must state the same version (About and package pages, Versions and releases).

Activation

SettingEffect
site.ini [ExtensionSettings] ActiveExtensions[]active everywhere, loaded before the siteaccess is known
ActiveAccessExtensions[] (in a siteaccess)active only in that siteaccess

Use ActiveExtensions[] for anything a command line script or cronjob must see; per-siteaccess activation means every script needs -s <siteaccess>.

Loading order

Extensions are read in their activation order (with ExtensionOrdering=enabled, dependencies from extension.xml are respected). Order decides which extension's template or setting wins. Change it in Setup > Extensions (Extension loading order).

Checklist for a new extension

  • To do: Name in lower case, new names start with exp (classes exp<Name>...).
  • To do: extension.xml, ezinfo.php and composer.json agree on name, version and license.
  • To do: Settings in settings/*.ini.append.php, never in the kernel's settings/.
  • To do: Autoloads regenerated after every new class.
  • To do: No secrets in the repository; keys go in settings/override/ of the installation.

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