Declaration File (ext_emconf.php)¶
-- required
The ext_emconf.php
is the single most important file in an extension.
Without it, the Extension Manager (EM) will not detect the extension, much less
be able to install it. This file contains a declaration of what the extension
is or does for the EM. The only thing included
is an associative array, $EM_CONF[extension key]
.
The keys are described in the table below.
This file is overwritten, when extensions are imported from the online repository. So don't write your custom code in this file - only change
values in the $EM_CONF
array if needed.
Key | Data type | Description |
---|---|---|
title | string, required | The name of the extension in English. |
description | string, required | Short and precise description in English of what the extension does and for whom it might be useful. |
version | string | Version of the extension. Automatically managed by EM / TER. Format is [int].[int].[int] |
category | string | Which category the extension belongs to:
|
constraints | array | List of requirements, suggestions or conflicts with other extensions or TYPO3 or PHP version. Here's how a typical setup might look: 'constraints' => [
'depends' => [
'typo3' => '9.5.0-10.4.99',
'php' => '7.2.0-7.4.99'
],
'conflicts' => [
'templavoilaplus' => ''
],
'suggests' => [
'news' => '7.3.0-0.0.0'
],
]
The above example indicates that the extension depends on a
version of TYPO3 between 9.5 and 10.4 (as only bug and security fixes are
integrated into TYPO3 when the last digit of the version changes, it is
safe to assume it will be compatible with any upcoming version of the
corresponding branch, thus |
state | string | Which state is the extension in
|
uploadfolder | boolean | If set, then the folder named uploads/tx_[extKey-with-no-underscore]
should be present! |
clearCacheOnLoad | boolean | If set, the EM will request the cache to be cleared when this extension is loaded. |
author | string | Author name |
author_email | email address | Author email address |
author_company | string | Author company |
autoload | array | To get better class loading support for websites in non-composer mode the following information can be provided. Extensions having one folder with classes or single files Considering you have an Extbase extension (or an extension where all classes
and interfaces reside in a 'autoload' => [
'classmap' => [
'Classes',
'a-class.php',
]
],
Extensions using namespaces If the extension has namespaced classes following the PSR-4 standard, then you
can add the following to your 'autoload' => [
'psr-4' => [
'Vendor\\ExtName\\' => 'Classes'
]
],
重要 The prefix must end with a backslash. |
autoload-dev | array | Same as the configuration "autoload" but it is only used if the ApplicationContext is set to Testing. |
Deprecated Configuration¶
The following fields are deprecated and should not be used anymore:
- dependencies
- conflicts
- suggests
- docPath
- CGLcompliance
- CGLcompliance_note
- private
- download_password
- shy
- loadOrder
- priority
- internal
- modify_tables
- module
- lockType
- TYPO3_version
- PHP_version