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

Extension points from PHP

Where PHP code plugs into Exponential without editing the kernel - the registration mechanisms (directory, handler, autoload, file, design, ini, registry, filter, override), the extension points a PHP developer uses…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/php-developers/extension-points-from-php.md

On this page

Extension points from PHP

This page is for PHP developers who want to change or add behavior and look for the right place to plug in. Exponential is extended in a handful of ways that repeat. kernel/setup/expradcatalogue.php (expRADCatalogue::points()) lists every extension point, and Setup > RAD (/setup/rad) is drawn from it: 70 extension points, 65 of them with a tool. The full list with each INI line is Extension points.

Contents

  1. The mechanisms
  2. The points PHP developers use most
  3. Choosing the lightest mechanism
  4. Handlers named by settings
  5. The RAD pages and the survey

The mechanisms

MechanismHow it is foundExample
directorya class in a directory the kernel scans, named by a ...Directories settingdatatypes, workflow event types
handlera class named by a setting and loaded through eZExtension::getHandlerClass()session handler, cluster file handler, mail transport
autoloada class reached through an extension autoload pathtemplate operators (ExtensionAutoloadPath[])
filea file in a place the kernel looks by namefunction_definition.php, module.php
designa template in a design, found through the design chainoverride templates
inisettings onlymost behavior switches
registryentries of a registry that rad.ini declaresdebug bar settings, system card providers
filtera listener of a filter event in site.ini [Event] Listeners[]response/output, httpcache/store/headers
overridea kernel class replaced through var/autoload/ezp_override.phpthe last resort

The points PHP developers use most

You want toPointPage
add a field typedatatypeWrite a datatype
add a workflow stepworkflow event typeWrite a workflow event type
add pagesmodule and viewsWrite your first module view
change one kernel view, command or cronjob part[RunnableSettings] Implementation[] subclassModule views as classes
give templates datafetch functionWrite a fetch function
give templates a helpertemplate operatorWrite a template operator in PHP
react to the kernelkernel event listenerEvents, listeners and filters
change a value on its wayfilter event listenerEvents, listeners and filters
JSON for your own JavaScriptserver-side ajax functionezjscore JSON endpoints in PHP
new REST routesREST providerREST and remote services from PHP
add a policy with limitationspolicy function and limitationPolicy functions and limitations
scheduled workcronjob script and partWrite a cronjob part
a commandextension commandWrite a console command

Choosing the lightest mechanism

Prefer, in this order:

  1. Settings (ini), when a setting already does what you need.
  2. A template override (design), when only output changes.
  3. A registered point (directory, handler, autoload, file, registry): the kernel calls your class by name, and several extensions can live side by side.
  4. A listener or filter, when you react to or adjust what the kernel does.
  5. A [RunnableSettings] Implementation[] subclass, when one method of a kernel view, command or cronjob part must change.
  6. A kernel override, only when nothing else works. Nothing registers the replacement by name, two extensions replacing the same class conflict silently, and you must follow every kernel update by hand (Kernel overrides, the last resort).

Handlers named by settings

Many infrastructure parts (session, cluster files, mail transport, search engine, image handler, static cache) are classes named by a setting, loaded with eZExtension::getHandlerClass(). Your class implements the same interface or extends the kernel's class, and the setting names it. A handler named in a setting must exist before the setting goes live; otherwise every request that needs it fails. Deploy code first, settings second, and guard with class_exists() where a missing class must not break pages (Handlers named by settings).

The RAD pages and the survey

  • /setup/rad shows every extension point, its mechanism, the setting that registers it and a tool that writes a skeleton for it (datatype, template operator, workflow event, module, settings extension ...) (RAD tools, RAD tools feature).
  • /setup/radsurvey counts what your installation registers at each point, the runnables and their re-implementations, and every entry that cannot work (a class that does not exist, a replacement that does not extend the class it replaces).

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