TYPO3 v8 has reached its end-of-life March 31st, 2020 and is not maintained by the community anymore.
You can order Extended Long Term Support (ELTS) here: TYPO3 ELTS.
Extension directory structure¶
An extension directory can contain the following files and directories, of which many are optional. Note that this list is incomplete. A full list is available in Files and locations.
This is the only mandatory file in the extension. It describes the extension for the rest of TYPO3.
This is the icon of the extension. The filename may not be changed. Preferred is using an SVG file.
This file contains hook definitions and plugin configuration. It must not contain a PHP encoding declaration. The filename may not be changed.
This file contains declarations of modules and backend styles. It must not contain a PHP encoding declaration. For more information about table declarations and definitions see the "TYPO3 Core API" document. The filename may not be changed.
This file contains SQL definitions for extension tables. The filename may not be changed.
The file may contain either a full table definition or a partial
table. The full table definition declares tables of the extension. It
looks like a normal SQL
CREATE TABLE statement.
The partial table definition contains a list of the fields that will be added to an existing table. Here is an example:
CREATE TABLE pages ( tx_myext_field int(11) DEFAULT '0' NOT NULL, );
Notice the comma after the field. In the full table definition it will be an error, but in the partial table definition it is required. TYPO3 will merge this table definition to the existing table definition when comparing expected and actual table definitions. Partial definitions can also contain indexes and other directives. They can also change existing table fields though that is not recommended, because it may create problems with the TYPO3 core and/or other extensions.
ext_tables.sql files. TYPO3 expects that all
table definitions in this file look like the ones produced by the
mysqldump utility. Incorrect definitions may not be recognized
by the TYPO3 SQL parser or may lead to MySQL errors, when TYPO3 tries
to apply them.
Directory for the PHP files of the extension, possibly in further
subfolders like for example
Directory for configuration files, in subfolders like
TSconfig/. E.g. the subfolder
TCA/ contains files
tablename.php, which return an array of the
configuration of the according table
This directory contains the extension manual in ReST format.
Documentation/ and its subfolders may contain several ReST
files, images and other resources.
This file contains the cover page of the extension manual in ReST format. The name or format of the file may not be changed. You may include other ReST files as you like. See the "Extension Template" on docs.typo3.org for more information about structure and syntax of extension manuals.
Contains the subfolders
contain resources, possibly in further subfolders, e.g.
This is also the directory for non–TYPO3 files supplied with the extension. TYPO3 is licensed under GPL version 2 or any later version. Any non–TYPO3 code must be compatible with GPL version 2 or any later version.
This directory contains tests, e.g. unit tests in the subfolder
This directory structure is strongly recommended. Extensions may create their own directories (for example, move all language files into other directories).
For the class names in extension files see the chapter "Namespaces and class names of user files".