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
File types¶
Changed in version 13.0
The PHP backed enum \TYPO3\
has been
introduced as a drop-in replacement for the public FILETYPE_*
constants in \TYPO3\
. See
Migration.
The constant file types have been marked as deprecated and will be
removed with TYPO3 v14.0. To be compatible with TYPO3 v12 and v13 use
the constants from \TYPO3\
.
Different types of file constants are defined in the enum
\TYPO3\
. These cases 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.
Enum case | Value | Description |
---|---|---|
File | 0 | Unknown |
File | 1 | Any kind of text |
File | 2 | Any kind of image |
File | 3 | Any kind of audio |
File | 4 | Any kind of video |
File | 5 | Any kind of application |
Migration¶
Migrate all usages to use the new enum \TYPO3\
as follows:
\TYPO3\
→CMS\ Core\ Resource\ Abstract File:: FILETYPE_ UNKNOWN \TYPO3\
CMS\ Core\ Resource\ File Type:: UNKNOWN->value \TYPO3\
→CMS\ Core\ Resource\ Abstract File:: FILETYPE_ TEXT \TYPO3\
CMS\ Core\ Resource\ File Type:: TEXT->value \TYPO3\
→CMS\ Core\ Resource\ Abstract File:: FILETYPE_ IMAGE \TYPO3\
CMS\ Core\ Resource\ File Type:: IMAGE->value \TYPO3\
→CMS\ Core\ Resource\ Abstract File:: FILETYPE_ AUDIO \TYPO3\
CMS\ Core\ Resource\ File Type:: AUDIO->value \TYPO3\
→CMS\ Core\ Resource\ Abstract File:: FILETYPE_ VIDEO \TYPO3\
CMS\ Core\ Resource\ File Type:: VIDEO->value \TYPO3\
→CMS\ Core\ Resource\ Abstract File:: FILETYPE_ APPLICATION \TYPO3\
CMS\ Core\ Resource\ File Type:: APPLICATION->value
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