File structure 

This chapter lists the reserved file and directory names in an extension and file naming conventions.

It should also help you find your way around automatically-generated or example extensions and sitepackages.

The following folder and file structure is typical for a TYPO3 extension:

Files 

An extension consists of:

  1. A directory named extension key (a worldwide unique identification string for the extension), located in typo3conf/ext for local extensions or typo3/sysext for system extensions.
  2. Standard files with reserved names for configuration related to TYPO3 (most are optional, see list below)
  3. Additional files for the main extension functionality.

Reserved file names 

Most of these files are not required, except ext_emconf.php in Classic mode installations not based on Composer and composer.json in Composer installations.

Do not use the prefix ext_ in your extension names as this is a reserved name.

Reserved Folders 

In the early days, extension authors "baked their own bread" when it came to PHP class file locations, public web resources and templates.

Since the rise of Extbase, a general structure for file locations inside extensions has become established. If extension authors stick to this and the Coding Guidelines, many things become easier. For instance, if you put your PHP classes into a Classes/ folder and use appropriate namespaces for the classes, the system will autoload the files.

Extension kickstarters like the friendsoftypo3/extension-builder will create the correct structure for you.