Constants
Constants in TYPO3 define paths and database information. These values are global and cannot be changed. Constants are defined at various points during the bootstrap sequence.
To make the information below a bit more compact, namespaces were left out. Here are the fully qualified class names referred to below:
Check \TYPO3\
method for more constants.
Table of contents
Paths
TYPO3_mainDir
Deprecated since version 12.0
Accessing the constant will stop working in TYPO3 v13.
It is recommended to use the
\TYPO3\
class when needing to direct to the TYPO3 Backend.
This is the directory of the backend administration for the sites of
this TYPO3 installation. Hardcoded to typo3/
. Must be a subdirectory
to the website.
- Defined in:
System
Environment Builder:: define Base Constants () - Available in Frontend:
- Yes
File types
Different types of file constants are defined in \TYPO3\
.
These constants are available for different groups of files as documented in
https://www.iana.org/assignments/media-types/media-types.xhtml
These file types are assigned to all FAL resources. They can, for example, be used in Fluid to decide how to render different types of files.
Constant | Value | Description |
---|---|---|
Abstract | 0 | Unknown |
Abstract | 1 | Any kind of text |
Abstract | 2 | Any kind of image |
Abstract | 3 | Any kind of audio |
Abstract | 4 | Any kind of video |
Abstract | 5 | Any kind of application |
HTTP status codes
The different status codes available are defined in EXT:core/Classes/Utility/HttpUtility.php (GitHub). These constants are defined as documented in https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml