Structuring a project¶
eZ Platform comes with default settings that will let you get started in a few minutes.
Most projects can use the provided
AppBundle, in the
src folder. It is enabled by default. The project's PHP code (controllers, event listeners, etc.) can be placed there.
Reusable libraries should be packaged so that they can easily be managed using Composer.
Project templates should go into
They can then be referenced in code without any prefix, for example
app/Resources/views/content/full.html.twig can be referenced in Twig templates or PHP as
Project assets should go into the
They can be referenced as relative to the root, for example
web/js/script.js can be referenced as
js/script.js from templates.
All project assets are accessible through the
Configuration may go into
app/config. However, service definitions from
AppBundle should go into
Versioning a project¶
The recommended method is to version the whole ezplatform repository. Per installation configuration should use