Skip to the content
Documentation
Manuals

Extension development: the book (start here)

A complete book on growing from user to builder, extension developer and theme developer with Exponential: finding ideas, building extensions with and without RAD tools, upgrading, forking ethically, releasing.

  • Topic type: Concept
  • For: Visitors Developers Designers Application creators
  • doc.help.extension-development.readme
  • Last changed
  • JSON
On this page

This book teaches you, step by step, to change what Exponential can do. It starts where you are, as a user of the administration, and takes you through four steps: builder (settings, templates, overrides), extension developer (modules, operators, datatypes, workflow events, cronjobs and more), theme developer (design extensions), and maintainer (releasing your work and contributing to other people's). Along the way it shows you where the community's existing extensions are, so that you start from what others built rather than from nothing, and how to reuse their work fairly.

Every command and code sample in the book was checked against the kernel it describes: the classes, methods and settings it names exist, the PHP samples pass php -l, and the template samples were rendered by the template engine. When a page states a fact, it names the file or the page where the fact comes from.

Official Exponential certifications are planned, part of the project's future plans for the community, partners, Exponential developers and students; they are not available yet (Certifications and certificates).

Developing on the whole stack: Velocity is part of Exponential 6.0.15

As of 6.0.15 the Velocity Internet / Web Application Server is part of Exponential: the root composer.json requires se7enxweb/exponential-velocity ~0.0.4.57 (through se7enxweb/exponential-php-floor, on PHP 8.0 and later), so your development installation has the same server production runs, on PHP 8.0 and later. For an extension developer that changes three things:

  • You develop against the engine that serves the site. Velocity's own server is the recommended engine for every stage, from your laptop to production (FrankenPHP is the production-ready alternative). Start it with ./console exp:velocity start after [ServerSettings] Engine=qbix.
  • Workers keep your code loaded. A changed class or setting reaches the site after ./console exp:velocity deploy (or restart), which regenerates the autoloads, clears the caches and restarts the workers in the right order; ./console exp:velocity cache clear --apply empties the response cache. Write code that keeps no per-request state in statics or globals, so it behaves the same under persistent workers and under PHP-FPM.
  • More is in the box. The RAD tools write a working extension in minutes, and Velocity adds WebSockets and Server-Sent Events, a scheduler and a response cache without another package. Exponential is one working stack (server, RAD platform, CMS, digital experience, e-commerce), not just a framework you complete yourself.

The story: Velocity is part of Exponential 6.0.15. The engines: Velocity engines. The RAD tools: RAD tools.

The parts

PartForWhat you learn
Part 1: From user to developereveryoneWhat an extension is, the tools, a development installation, reading the code and the logs, finding existing extensions on GitHub, Packagist, Share Exponential, Exponential Projects and eZpedia, and reusing them within their licenses
Part 2: The builderbuilders, designers, application creatorsSettings and their scopes, templates, the design chain, overrides, view modes, fetch, content classes, roles, workflows, cronjobs, all without PHP
Part 3: The extension developerdevelopersThe anatomy of an extension, chapter by chapter: metadata, settings, autoloads, modules and views, policies, operators, fetch functions, datatypes, workflow events, cronjobs, commands, designs, ajax, translations, tables, events, handlers, security, CSP, admin pages, tests, documentation
TutorialsdevelopersReal small extensions built step by step, with the RAD tools and by hand
Part 4: Upgrading an old extensiondevelopersBringing an extension written for older PHP and older releases to Exponential 6, with before and after examples from extensions this project modernized
Part 5: Extending, forking and contributingdevelopers, designersExtending without forking, forking and rebranding ethically, licenses, attribution, pull requests, adopting abandoned extensions, the maintainer path
Part 6: Theme developersdesignersThemes as design extensions, with the RAD wizard and by hand; assets, the packer, CSP, dark mode, distribution
Part 7: Releasing your extensionmaintainersVersion numbers, metadata, Composer and Packagist, changelogs, GitHub releases, packages, the release checklist
Part 8: ReferencedevelopersThe kernel classes, APIs, operators, functions, settings and commands an extension author uses most

Where to start

You areStart with
An editor or administrator who wants to buildPart 1, then Part 2
A PHP developer new to ExponentialWhat an extension is, then Part 3 and the tutorials
A designerPart 2, then Part 6
An application creatorPart 2, then the capstone tutorial
Someone with an old extension to bring up to datePart 4
About to publish an extensionPart 7 and Part 5

Reading paths through the book gives complete reading orders for each role, and the book index lists every topic from A to Z.

Fast: what can I build, and how quickly?

You wantFastest wayChapter
A new value or function for templatesa template operator, with the RAD wizard in minutesWith RAD: a template operator in five minutes
A page with its own addressa module with a viewBy hand: a module with a view
A new kind of field for contenta datatypeWith RAD: a datatype
Something to happen when content is publisheda workflow eventWith RAD: a workflow event
A job that runs every nighta cronjob partBy hand: a cronjob part
A new looka design extensionPart 6
The site's settings under version controla settings-only extensionWith RAD: a settings-only extension

The RAD tools live at Setup > RAD (/setup/rad); they list every place the kernel can be extended and write a working extension for most of them. Every tutorial also shows the same extension written by hand, so you understand what the wizard wrote and can work without it.

Conventions in this book

  • Commands run from the installation root. ./console is a shortcut to bin/php/console (how to create it). Add --allow-root-user when you run a command as root.
  • Example extensions are called mysite_hello and similar, and new classes start with exp or your own prefix, never with ez: that prefix belongs to the kernel's existing classes.
  • Administration paths are written as Setup > RAD and addresses as /setup/rad.
  • The product is Exponential. It continues the code base of eZ Publish, which its creator discontinued after almost 18 years; kernel identifiers such as eZINI and file names such as ezinfo.php keep their historical names.

Demo mode. Code that sets or changes user passwords should respect demo mode (EXP_DEMO_MODE=1 on public demos): Demo mode for developers.

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. Start with Partners: start here and How to apply.

Was this helpful?

Only your answer is kept, not who you are.

Something wrong on this page? Report an error