File structure
Lists reserved file and directory names within an extension. Also lists file names that are used in a certain way by convention.
This chapter should also help you to find your way around in extensions and sitepackages that where automatically generated or that you downloaded as an example.
The following folders and files can typically be found in a TYPO3 extension:
-
-
...
-
-
-
-
-
-
-
-
<tablename>.php
-
...
-
-
<tablename>.php
-
...
-
-
-
...
-
-
-
...
-
constants.typoscript
-
setup.typoscript
-
-
-
-
...
-
-
-
-
-
...
-
-
-
...
-
-
-
...
-
-
-
...
-
-
...
-
-
-
...
-
-
-
-
-
...
-
-
-
...
-
-
...
-
Files
An extension consists of:
- A directory named by the extension key (which is a worldwide unique
identification string for the extension), usually located in
typo3conf/
for local extensions, orext typo3/
for system extensions.sysext - Standard files with reserved names for configuration related to TYPO3 (of which most are optional, see list below)
- Any number of additional files for the extension functionality itself.
Reserved file names
Most of these files are not required, except of ext_
in legacy installations not based on Composer
and composer.
in Composer installations
installations.
Note
It is recommended to keep ext_
and composer.
in
any public extension that is published to TYPO3 Extension Repository (TER), and
to ensure optimal compatibility with Composer installations and legacy
installations.
Do not introduce your own files in the root directory of
extensions with the name prefix ext_
, because that is reserved.
Reserved Folders
In the early days, every extension author baked his own bread when it came to file locations of PHP classes, public web resources and templates.
With the rise of Extbase, a generally accepted structure for file
locations inside of extensions has been established. If extension authors
stick to this and the other Coding Guidelines, the system helps in various ways. For instance, if putting
PHP classes into the Classes/
folder and using appropriate namespaces for the classes,
the system will be able to autoload these files.
Extension kickstarters like the friendsoftypo3/extension-builder will create the correct structure for you.