‪TYPO3CMS  9.5
TYPO3\CMS\Core\Utility\ExtensionManagementUtility Class Reference
Inheritance diagram for TYPO3\CMS\Core\Utility\ExtensionManagementUtility:
TYPO3\CMS\Core\Tests\Unit\Utility\AccessibleProxies\ExtensionManagementUtilityAccessibleProxy

Static Public Member Functions

static setPackageManager (PackageManager $packageManager)
 
static bool isLoaded ($key, $exitOnError=null)
 
static string extPath ($key, $script='')
 
static string siteRelPath ($key)
 
static string getCN ($key)
 
static mixed getExtensionKeyByPrefix ($prefix)
 
static clearExtensionKeyMap ()
 
static string getExtensionVersion ($key)
 
static addTCAcolumns ($table, $columnArray)
 
static addToAllTCAtypes ($table, $newFieldsString, $typeList='', $position='')
 
static addFieldsToAllPalettesOfField ($table, $field, $addFields, $insertionPosition='')
 
static addFieldsToPalette ($table, $palette, $addFields, $insertionPosition='')
 
static addTcaSelectItem ($table, $field, array $item, $relativeToField='', $relativePosition='')
 
static array getFileFieldTCAConfig ($fieldName, array $customSettingOverride=[], $allowedFileExtensions='', $disallowedFileExtensions='')
 
static addFieldsToUserSettings ($addFields, $insertionPosition='')
 
static allowTableOnStandardPages ($table)
 
static array configureModule ($moduleSignature)
 
static addModule ($main, $sub='', $position='', $path=null, $moduleConfiguration=[])
 
static insertModuleFunction ($modname, $className, $_=null, $title, $MM_key='function', $WS='')
 
static addPageTSConfig ($content)
 
static addUserTSConfig ($content)
 
static addLLrefForTCAdescr ($key, $file)
 
static addNavigationComponent ($module, $componentId, $extensionKey)
 
static addCoreNavigationComponent ($module, $componentId)
 
static addService ($extKey, $serviceType, $serviceKey, $info)
 
static mixed findService ($serviceType, $serviceSubType='', $excludeServiceKeys=[])
 
static array findServiceByKey ($serviceKey)
 
static bool isServiceAvailable ($serviceType, $serviceKey, $serviceDetails)
 
static deactivateService ($serviceType, $serviceKey)
 
static addPlugin ($itemArray, $type='list_type', $extensionKey=null)
 
static addPiFlexFormValue ($piKeyToMatch, $value, $CTypeToMatch='list')
 
static addToInsertRecords ($table, $content_table='tt_content', $content_field='records')
 
static addPItoST43 ($key, $_='', $suffix='', $type='list_type', $cacheable=false)
 
static addStaticFile ($extKey, $path, $title)
 
static registerPageTSConfigFile ($extKey, $filePath, $title)
 
static addTypoScriptSetup ($content)
 
static addTypoScriptConstants ($content)
 
static addTypoScript (string $key, string $type, string $content, $afterStaticUid=0)
 
static string getExtensionIcon ($extensionPath, $returnFullPath=false)
 
static loadExtLocalconf ($allowCaching=true, FrontendInterface $codeCache=null)
 
static loadBaseTca ($allowCaching=true, FrontendInterface $codeCache=null)
 
static loadExtTables ($allowCaching=true)
 
static removeCacheFiles ()
 
static array getLoadedExtensionListArray ()
 
static loadExtension ($extensionKey)
 
static unloadExtension ($extensionKey)
 
static makeCategorizable ($extensionKey, $tableName, $fieldName='categories', array $options=[], $override=false)
 

Static Protected Member Functions

static TYPO3 CMS Core Cache CacheManager getCacheManager ()
 
static TYPO3 CMS Extbase SignalSlot Dispatcher getSignalSlotDispatcher ()
 
static string executePositionedStringInsertion ($list, $insertionList, $insertionPosition='')
 
static string removeDuplicatesForInsertion ($insertionList, $list='')
 
static array explodeItemList ($itemList)
 
static string generateItemList (array $items, $useRawData=false)
 
static loadSingleExtLocalconfFiles ()
 
static createExtLocalconfCacheEntry (FrontendInterface $codeCache)
 
static string getExtLocalconfCacheIdentifier ()
 
static buildBaseTcaFromSingleFiles ()
 
static emitTcaIsBeingBuiltSignal (array $tca)
 
static createBaseTcaCacheFile (FrontendInterface $codeCache)
 
static string getBaseTcaCacheIdentifier ()
 
static loadSingleExtTablesFiles ()
 
static createExtTablesCacheEntry ()
 
static string getExtTablesCacheIdentifier ()
 

Static Protected Attributes

static array $extensionKeyMap
 
static bool $extTablesWasReadFromCacheOnce = false
 
static PackageManager $packageManager
 
static TYPO3 CMS Core Cache CacheManager $cacheManager
 
static TYPO3 CMS Extbase SignalSlot Dispatcher $signalSlotDispatcher
 

Detailed Description

Extension Management functions

This class is never instantiated, rather the methods inside is called as functions like \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('my_extension');

Definition at line 35 of file ExtensionManagementUtility.php.

Member Function Documentation

◆ addCoreNavigationComponent()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addCoreNavigationComponent (   $module,
  $componentId 
)
static

Registers a core navigation component

Parameters
string$module
string$componentId

Definition at line 1047 of file ExtensionManagementUtility.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addNavigationComponent().

◆ addFieldsToAllPalettesOfField()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToAllPalettesOfField (   $table,
  $field,
  $addFields,
  $insertionPosition = '' 
)
static

Adds new fields to all palettes that is defined after an existing field. If the field does not have a following palette yet, it's created automatically and gets called "generatedFor-$field". FOR USE IN files in Configuration/TCA/Overrides/*.php Use in ext_tables.php FILES may break the frontend.

See unit tests for more examples and edge cases.

Example:

'aTable' => array( 'types' => array( 'aType' => array( 'showitem' => 'aField, –palette–;;aPalette', ), ), 'palettes' => array( 'aPallete' => array( 'showitem' => 'fieldB, fieldC', ), ), ),

Calling addFieldsToAllPalettesOfField('aTable', 'aField', 'newA', 'before: fieldC') results in:

'aTable' => array( 'types' => array( 'aType' => array( 'showitem' => 'aField, –palette–;;aPalette', ), ), 'palettes' => array( 'aPallete' => array( 'showitem' => 'fieldB, newA, fieldC', ), ), ),

Parameters
string$table‪Name of the table
string$field‪Name of the field that has the palette to be extended
string$addFields‪List of fields to be added to the palette
string$insertionPosition‪Insert fields before (default) or after one

Definition at line 409 of file ExtensionManagementUtility.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addFieldsToPalette().

◆ addFieldsToPalette()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette (   $table,
  $palette,
  $addFields,
  $insertionPosition = '' 
)
static

Adds new fields to a palette. If the palette does not exist yet, it's created automatically. FOR USE IN files in Configuration/TCA/Overrides/*.php Use in ext_tables.php FILES may break the frontend.

Parameters
string$table‪Name of the table
string$palette‪Name of the palette to be extended
string$addFields‪List of fields to be added to the palette
string$insertionPosition‪Insert fields before (default) or after one

Definition at line 462 of file ExtensionManagementUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\ExtensionManagementUtility\executePositionedStringInsertion(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\removeDuplicatesForInsertion().

Referenced by TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addFieldsToAllPalettesOfField(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addToAllTCAtypes().

◆ addFieldsToUserSettings()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToUserSettings (   $addFields,
  $insertionPosition = '' 
)
static

Adds a list of new fields to the TYPO3 USER SETTINGS configuration "showitem" list, the array with the new fields itself needs to be added additionally to show up in the user setup, like $GLOBALS['TYPO3_USER_SETTINGS']['columns'] += $tempColumns

Parameters
string$addFields‪List of fields to be added to the user settings
string$insertionPosition‪Insert fields before (default) or after one

Definition at line 626 of file ExtensionManagementUtility.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\executePositionedStringInsertion().

◆ addLLrefForTCAdescr()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr (   $key,
  $file 
)
static

Adds a reference to a locallang file with $GLOBALS['TCA_DESCR'] labels FOR USE IN ext_tables.php FILES eg. \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('pages', 'EXT:core/Resources/Private/Language/locallang_csh_pages.xlf'); for the pages table or \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_layout', 'EXT:frontend/Resources/Private/Language/locallang_csh_weblayout.xlf'); for the Web > Page module.

Parameters
string$key‪Description key. Typically a database table (like "pages") but for applications can be other strings, but prefixed with "_MOD_")
string$fileFile reference to locallang file, eg. "EXT:core/Resources/Private/Language/locallang_csh_pages.xlf" (or ".xml")

Definition at line 1007 of file ExtensionManagementUtility.php.

References $GLOBALS.

◆ addModule()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule (   $main,
  $sub = '',
  $position = '',
  $path = null,
  $moduleConfiguration = [] 
)
static

Adds a module (main or sub) to the backend interface FOR USE IN ext_tables.php FILES

Parameters
string$main‪The main module key, $sub is the submodule key. So $main would be an index in the $TBE_MODULES array and $sub could be an element in the lists there.
string$sub‪The submodule key. If $sub is not set a blank $main module is created.
string$position‪Can be used to set the position of the $sub module within the list of existing submodules for the main module. $position has this syntax: [cmd]:[submodule-key]. cmd can be "after", "before" or "top" (or blank which is default). If "after"/"before" then submodule will be inserted after/before the existing submodule with [submodule-key] if found. If not found, the bottom of list. If "top" the module is inserted in the top of the submodule list.
string$path‪The absolute path to the module. Was used prior to TYPO3 v8, use $moduleConfiguration[routeTarget] now
array$moduleConfiguration‪additional configuration, previously put in "conf.php" of the module directory

Definition at line 863 of file ExtensionManagementUtility.php.

References $GLOBALS, and $iconRegistry.

Referenced by TYPO3\CMS\Extbase\Utility\ExtensionUtility\registerModule().

◆ addNavigationComponent()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addNavigationComponent (   $module,
  $componentId,
  $extensionKey 
)
static

Registers a navigation component e.g. page tree

Parameters
string$module
string$componentId‪componentId is also an RequireJS module name e.g. 'TYPO3/CMS/MyExt/MyNavComponent'
string$extensionKey
Exceptions

Definition at line 1029 of file ExtensionManagementUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addCoreNavigationComponent(), and TYPO3\CMS\Install\Tests\Unit\ExtensionScanner\Php\Matcher\Fixtures\MethodArgumentRequiredStaticMatcherFixture\aMethod().

◆ addPageTSConfig()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig (   $content)
static

Adds $content to the default Page TSconfig as set in $GLOBALS['TYPO3_CONF_VARS'][BE]['defaultPageTSconfig'] Prefixed with a [GLOBAL] line FOR USE IN ext_localconf.php FILE

Parameters
string$contentPage TSconfig content

Definition at line 978 of file ExtensionManagementUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\DefaultValuesTest\defaultValuesFromGlobalTSconfigForNewRecordsIsRespected(), and TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\DefaultValuesTest\defaultValuesFromPageSpecificTSconfigForNewRecordsIsRespected().

◆ addPiFlexFormValue()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue (   $piKeyToMatch,
  $value,
  $CTypeToMatch = 'list' 
)
static

Adds an entry to the "ds" array of the tt_content field "pi_flexform". This is used by plugins to add a flexform XML reference / content for use when they are selected as plugin or content element. FOR USE IN files in Configuration/TCA/Overrides/*.php Use in ext_tables.php FILES may break the frontend.

Parameters
string$piKeyToMatch‪Plugin key as used in the list_type field. Use the asterisk * to match all list_type values.
string$value‪Either a reference to a flex-form XML file (eg. "FILE:EXT:newloginbox/flexform_ds.xml") or the XML directly.
string$CTypeToMatch‪Value of tt_content.CType (Content Type) to match. The default is "list" which corresponds to the "Insert Plugin" content element. Use the asterisk * to match all CType values.
See also
addPlugin()

Definition at line 1273 of file ExtensionManagementUtility.php.

References $GLOBALS.

◆ addPItoST43()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43 (   $key,
  $_ = '',
  $suffix = '',
  $type = 'list_type',
  $cacheable = false 
)
static

Add PlugIn to the default template rendering (previously called "Static Template #43")

When adding a frontend plugin you will have to add both an entry to the TCA definition of tt_content table AND to the TypoScript template which must initiate the rendering.

The naming of #43 has historic reason and is rooted inside code which is now put into a TER extension called "statictemplates". Since the static template with uid 43 is the "content.default" and practically always used for rendering the content elements it's very useful to have this function automatically adding the necessary TypoScript for calling your plugin. The logic is now generalized and called "defaultContentRendering", see addTypoScript() as well.

$type determines the type of frontend plugin:

  • ‪list_type (default) - the good old "Insert plugin" entry
  • ‪menu_type - a "Menu/Sitemap" entry
  • ‪CType - a new content element type
  • ‪header_layout - an additional header type (added to the selection of layout1-5)
  • ‪includeLib - just includes the library for manual use somewhere in TypoScript. (Remember that your $type definition should correspond to the column/items array in $GLOBALS['TCA'][tt_content] where you added the selector item for the element! See addPlugin() function) FOR USE IN ext_localconf.php FILES
Parameters
string$key‪The extension key
string$_‪unused since TYPO3 CMS 8
string$suffix‪Is used as a suffix of the class name (e.g. "_pi1")
string$type‪See description above
bool$cacheable‪If $cached is set as USER content object (cObject) is created - otherwise a USER_INT object is created.

Definition at line 1322 of file ExtensionManagementUtility.php.

References TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addTypoScript(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getCN().

◆ addPlugin()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin (   $itemArray,
  $type = 'list_type',
  $extensionKey = null 
)
static

Adds an entry to the list of plugins in content elements of type "Insert plugin" Takes the $itemArray (label, value[,icon]) and adds to the items-array of $GLOBALS['TCA'][tt_content] elements with CType "listtype" (or another field if $type points to another fieldname) If the value (array pos. 1) is already found in that items-array, the entry is substituted, otherwise the input array is added to the bottom. Use this function to add a frontend plugin to this list of plugin-types - or more generally use this function to add an entry to any selectorbox/radio-button set in the FormEngine

FOR USE IN files in Configuration/TCA/Overrides/*.php Use in ext_tables.php FILES may break the frontend.

Parameters
array$itemArray‪Numerical array: [0] => Plugin label, [1] => Plugin identifier / plugin key, ideally prefixed with a extension-specific name (e.g. "events2_list"), [2] => Path to plugin icon relative to TYPO3_mainDir
string$typeType (eg. "list_type") - basically a field from "tt_content" table
string$extensionKey‪The extension key
Exceptions

Definition at line 1236 of file ExtensionManagementUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Extbase\Utility\ExtensionUtility\registerPlugin().

◆ addService()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addService (   $extKey,
  $serviceType,
  $serviceKey,
  $info 
)
static

Adds a service to the global services array

Parameters
string$extKey‪Extension key
string$serviceTypeService type, must not be prefixed "tx_" or "Tx_"
string$serviceKeyService key, must be prefixed "tx_", "Tx_" or "user_"
array$infoService description array

Definition at line 1066 of file ExtensionManagementUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\ExtensionManagementUtility\deactivateService(), and TYPO3\CMS\Core\Core\Environment\isWindows().

◆ addStaticFile()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile (   $extKey,
  $path,
  $title 
)
static

Call this method to add an entry in the static template list found in sys_templates FOR USE IN Configuration/TCA/Overrides/sys_template.php Use in ext_tables.php may break the frontend.

Parameters
string$extKey‪Is of course the extension key
string$path‪Is the path where the template files (fixed names) include_static.txt, constants.txt, setup.txt, and include_static_file.txt is found (relative to extPath, eg. 'static/'). The file include_static_file.txt, allows you to include other static templates defined in files, from your static template, and thus corresponds to the field 'include_static_file' in the sys_template table. The syntax for this is a comma separated list of static templates to include, like: EXT:fluid_styled_content/Configuration/TypoScript/,EXT:da_newsletter_subscription/static/,EXT:cc_random_image/pi2/static/
string$title‪Is the title in the selector box.
Exceptions

Definition at line 1377 of file ExtensionManagementUtility.php.

References $GLOBALS.

◆ addTCAcolumns()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns (   $table,
  $columnArray 
)
static

Adding fields to an existing table definition in $GLOBALS['TCA'] Adds an array with $GLOBALS['TCA'] column-configuration to the $GLOBALS['TCA']-entry for that table. This function adds the configuration needed for rendering of the field in TCEFORMS - but it does NOT add the field names to the types lists! So to have the fields displayed you must also call fx. addToAllTCAtypes or manually add the fields to the types list. FOR USE IN files in Configuration/TCA/Overrides/*.php . Use in ext_tables.php FILES may break the frontend.

Parameters
string$table‪The table name of a table already present in $GLOBALS['TCA'] with a columns section
array$columnArray‪The array with the additional columns (typical some fields an extension wants to add)

Definition at line 260 of file ExtensionManagementUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Category\CategoryRegistry\addTcaColumn().

◆ addTcaSelectItem()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem (   $table,
  $field,
array  $item,
  $relativeToField = '',
  $relativePosition = '' 
)
static

Add an item to a select field item list.

Warning: Do not use this method for radio or check types, especially not with $relativeToField and $relativePosition parameters. This would shift existing database data 'off by one'. FOR USE IN files in Configuration/TCA/Overrides/*.php Use in ext_tables.php FILES may break the frontend.

As an example, this can be used to add an item to tt_content CType select drop-down after the existing 'mailform' field with these parameters:

  • ‪$table = 'tt_content'
  • ‪$field = 'CType'
  • ‪$item = array( 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.I.10', 'login', 'i/imagename.gif', ),
  • ‪$relativeToField = mailform
  • ‪$relativePosition = after
Exceptions

Definition at line 503 of file ExtensionManagementUtility.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\ArrayUtility\filterByValueRecursive().

◆ addToAllTCAtypes()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes (   $table,
  $newFieldsString,
  $typeList = '',
  $position = '' 
)
static

Makes fields visible in the TCEforms, adding them to the end of (all) "types"-configurations

Adds a string $string (comma separated list of field names) to all ["types"][xxx]["showitem"] entries for table $table (unless limited by $typeList) This is needed to have new fields shown automatically in the TCEFORMS of a record from $table. Typically this function is called after having added new columns (database fields) with the addTCAcolumns function FOR USE IN files in Configuration/TCA/Overrides/*.php Use in ext_tables.php FILES may break the frontend.

Parameters
string$table‪Table name
string$newFieldsString‪Field list to add.
string$typeList‪List of specific types to add the field list to. (If empty, all type entries are affected)
string$position‪Insert fields before (default) or after one, or replace a field

Definition at line 281 of file ExtensionManagementUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addFieldsToPalette(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\executePositionedStringInsertion().

Referenced by TYPO3\CMS\Core\Category\CategoryRegistry\addToAllTCAtypes().

◆ addToInsertRecords()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords (   $table,
  $content_table = 'tt_content',
  $content_field = 'records' 
)
static

Adds the $table tablename to the list of tables allowed to be includes by content element type "Insert records" By using $content_table and $content_field you can also use the function for other tables. FOR USE IN files in Configuration/TCA/Overrides/*.php Use in ext_tables.php FILES may break the frontend.

Parameters
string$table‪Table name to allow for "insert record
string$content_table‪Table name TO WHICH the $table name is applied. See $content_field as well.
string$content_field‪Field name in the database $content_table in which $table is allowed to be added as a reference ("Insert Record")

Definition at line 1289 of file ExtensionManagementUtility.php.

References $GLOBALS.

◆ addTypoScript()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript ( string  $key,
string  $type,
string  $content,
  $afterStaticUid = 0 
)
static

Adds $content to the default TypoScript code for either setup or constants as set in $GLOBALS['TYPO3_CONF_VARS'][FE]['defaultTypoScript_*'] (Basically this function can do the same as addTypoScriptSetup and addTypoScriptConstants - just with a little more hazzle, but also with some more options!) FOR USE IN ext_localconf.php FILES Note: As of TYPO3 CMS 6.2, static template #43 (content: default) was replaced with "defaultContentRendering" which makes it possible that a first extension like fluid_styled_content registers a "contentRendering" template (= a template that defines default content rendering TypoScript) by adding itself to $TYPO3_CONF_VARS[FE][contentRenderingTemplates][] = 'myext/Configuration/TypoScript'. An extension calling addTypoScript('myext', 'setup', $typoScript, 'defaultContentRendering') will add its TypoScript directly after; For now, "43" and "defaultContentRendering" can be used, but "defaultContentRendering" is more descriptive and should be used in the future.

Parameters
string$key‪Is the extension key (informative only).
string$type‪Is either "setup" or "constants" and obviously determines which kind of TypoScript code we are adding.
string$content‪Is the TS content, will be prefixed with a [GLOBAL] line and a comment-header.
int|string‪string pointing to the "key" of a static_file template ([reduced extension_key]/[local path]). The points is that the TypoScript you add is included only IF that static template is included (and in that case, right after). So effectively the TypoScript you set can specifically overrule settings from those static templates.
Exceptions

Definition at line 1463 of file ExtensionManagementUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addPItoST43(), and TYPO3\CMS\Extbase\Utility\ExtensionUtility\configurePlugin().

◆ addTypoScriptConstants()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants (   $content)
static

Adds $content to the default TypoScript constants code as set in $GLOBALS['TYPO3_CONF_VARS'][FE]['defaultTypoScript_constants'] Prefixed with a [GLOBAL] line FOR USE IN ext_localconf.php FILES

Parameters
string$contentTypoScript Constants string

Definition at line 1439 of file ExtensionManagementUtility.php.

References $GLOBALS.

◆ addTypoScriptSetup()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup (   $content)
static

Adds $content to the default TypoScript setup code as set in $GLOBALS['TYPO3_CONF_VARS'][FE]['defaultTypoScript_setup'] Prefixed with a [GLOBAL] line FOR USE IN ext_localconf.php FILES

Parameters
string$contentTypoScript Setup string

Definition at line 1425 of file ExtensionManagementUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Form\Tests\Functional\Hooks\FormFileExtensionUpdateTest\setUpAllowedExtensionPaths().

◆ addUserTSConfig()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig (   $content)
static

Adds $content to the default User TSconfig as set in $GLOBALS['TYPO3_CONF_VARS'][BE]['defaultUserTSconfig'] Prefixed with a [GLOBAL] line FOR USE IN ext_localconf.php FILE

Parameters
string$content‪User TSconfig content

Definition at line 992 of file ExtensionManagementUtility.php.

References $GLOBALS.

◆ allowTableOnStandardPages()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages (   $table)
static

Add tablename to default list of allowed tables on pages (in $PAGES_TYPES) Will add the $table to the list of tables allowed by default on pages as setup by $PAGES_TYPES['default']['allowedTables'] FOR USE IN ext_tables.php FILES

Parameters
string$table‪Table name

Definition at line 818 of file ExtensionManagementUtility.php.

References $GLOBALS.

◆ buildBaseTcaFromSingleFiles()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::buildBaseTcaFromSingleFiles ( )
staticprotected

Find all Configuration/TCA/* files of extensions and create base TCA from it. The filename must be the table name in $GLOBALS['TCA'], and the content of the file should return an array with content of a specific table.

See also
‪Extension core, extensionmanager and others for examples.

Reimplemented in TYPO3\CMS\Core\Tests\Unit\Utility\AccessibleProxies\ExtensionManagementUtilityAccessibleProxy.

Definition at line 1677 of file ExtensionManagementUtility.php.

References $finder, $GLOBALS, TYPO3\CMS\Core\Category\CategoryRegistry\applyTcaForPreRegisteredTables(), and TYPO3\CMS\Core\Category\CategoryRegistry\getInstance().

◆ clearExtensionKeyMap()

◆ configureModule()

static array TYPO3\CMS\Core\Utility\ExtensionManagementUtility::configureModule (   $moduleSignature)
static

This method is called from \TYPO3\CMS\Backend\Module\ModuleLoader::checkMod and it replaces old conf.php.

Parameters
string$moduleSignature‪The module name
Returns
‪array Configuration of the module
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0, addModule() works the same way nowadays.

Definition at line 831 of file ExtensionManagementUtility.php.

References $GLOBALS, and $iconRegistry.

◆ createBaseTcaCacheFile()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::createBaseTcaCacheFile ( FrontendInterface  $codeCache)
staticprotected

Cache base $GLOBALS['TCA'] to cache file to require the whole thing in one file for next access instead of cycling through all extensions again.

Parameters
FrontendInterface$codeCache

Definition at line 1758 of file ExtensionManagementUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Category\CategoryRegistry\getInstance(), and TYPO3\CMS\Core\Cache\Frontend\FrontendInterface\set().

◆ createExtLocalconfCacheEntry()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::createExtLocalconfCacheEntry ( FrontendInterface  $codeCache)
staticprotected

Create cache entry for concatenated ext_localconf.php files

Parameters
FrontendInterface$codeCache

Reimplemented in TYPO3\CMS\Core\Tests\Unit\Utility\AccessibleProxies\ExtensionManagementUtilityAccessibleProxy.

Definition at line 1586 of file ExtensionManagementUtility.php.

References $GLOBALS, and TYPO3\CMS\Core\Cache\Frontend\FrontendInterface\set().

Referenced by TYPO3\CMS\Core\Utility\ExtensionManagementUtility\loadExtLocalconf().

◆ createExtTablesCacheEntry()

◆ deactivateService()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::deactivateService (   $serviceType,
  $serviceKey 
)
static

◆ emitTcaIsBeingBuiltSignal()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::emitTcaIsBeingBuiltSignal ( array  $tca)
staticprotected

Emits the signal and uses the result of slots for the final TCA This means, that all slots must return the complete TCA to be effective. If a slot calls methods that manipulate the global array, it needs to return the global array in the end. To be future proof, a slot should manipulate the signal argument only and return it after manipulation.

Parameters
array$tca

Reimplemented in TYPO3\CMS\Core\Tests\Unit\Utility\AccessibleProxies\ExtensionManagementUtilityAccessibleProxy.

Definition at line 1746 of file ExtensionManagementUtility.php.

References $GLOBALS, and $tca.

◆ executePositionedStringInsertion()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::executePositionedStringInsertion (   $list,
  $insertionList,
  $insertionPosition = '' 
)
staticprotected

Inserts as list of data into an existing list. The insertion position can be defined accordant before of after existing list items.

Example:

  • ‪list: 'field_a, field_b, field_c'
  • ‪insertionList: 'field_d, field_e'
  • ‪insertionPosition: 'after:field_b' -> 'field_a, field_b, field_d, field_e, field_c'

$insertPosition may contain ; and - characters: after:–palette–;;title

Parameters
string$list‪The list of items to be extended
string$insertionList‪The list of items to inserted
string$insertionPosition‪Insert fields before (default) or after one
Returns
‪string The extended list

Definition at line 648 of file ExtensionManagementUtility.php.

References TYPO3\CMS\Core\Utility\ExtensionManagementUtility\removeDuplicatesForInsertion().

Referenced by TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addFieldsToPalette(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addFieldsToUserSettings(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addToAllTCAtypes().

◆ explodeItemList()

static array TYPO3\CMS\Core\Utility\ExtensionManagementUtility::explodeItemList (   $itemList)
staticprotected

Generates an array of fields/items with additional information such as e.g. the name of the palette.

Parameters
string$itemList‪List of fields/items to be splitted up
Returns
‪array An array with the names of the fields/items as keys and additional information

Definition at line 749 of file ExtensionManagementUtility.php.

◆ extPath()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath (   $key,
  $script = '' 
)
static

Returns the absolute path to the extension with extension key $key.

Parameters
string$key‪Extension key
string$script‪$script is appended to the output if set.
Exceptions

Definition at line 149 of file ExtensionManagementUtility.php.

Referenced by TYPO3\CMS\Seo\XmlSitemap\XmlSitemapRenderer\__construct(), TYPO3\CMS\Install\UpgradeAnalysis\DocumentationFile\__construct(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\__construct(), TYPO3\CMS\Impexp\Controller\ImportExportController\__construct(), TYPO3\CMS\Install\Controller\BackendModuleController\backendUserConfirmationAction(), TYPO3\CMS\Install\Controller\EnvironmentController\convertImageFormatsToJpg(), TYPO3\CMS\Core\Cache\Backend\PdoBackend\createCacheTables(), TYPO3\CMS\Recycler\Controller\RecyclerAjaxController\dispatch(), TYPO3\CMS\Beuser\Controller\PermissionAjaxController\dispatch(), TYPO3\CMS\Install\Updates\ExtensionManagerTables\executeUpdate(), TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerMarkFullyScannedRestFilesAction(), TYPO3\CMS\Install\Controller\UpgradeController\extensionScannerScanFileAction(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\extPathAppendsScriptNameToPath(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\extPathThrowsExceptionIfExtensionIsNotLoaded(), TYPO3\CMS\Lowlevel\Controller\DatabaseIntegrityController\func_refindex(), TYPO3\CMS\Backend\Template\DocumentTemplate\getBackendFavicon(), TYPO3\CMS\Install\Controller\UpgradeController\getDocumentationDirectories(), TYPO3\CMS\Install\Controller\UpgradeController\getDocumentationFiles(), TYPO3\CMS\Backend\Template\ModuleTemplate\getDynamicTabMenu(), TYPO3\CMS\Fluid\View\TemplatePaths\getExtensionPrivateResourcesPath(), TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController\getPagesTSconfig(), TYPO3\CMS\Backend\Utility\BackendUtility\getRawPagesTSconfig(), TYPO3\CMS\Backend\Template\DocumentTemplate\getSkinStylesheetDirectories(), TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend\getTableDefinitions(), TYPO3\CMS\Install\Updates\ExtensionManagerTables\getTableStatements(), TYPO3\CMS\Core\Imaging\GraphicalFunctions\getTemporaryImageWithText(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingCombineGifMaskAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingCombineJpgMaskAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibFromFileAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibNiceTextAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibNiceTextShadowAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGdlibRenderTextAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGifToGifAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingGifToJpgAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingPngToPngAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingTrueTypeAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWriteGifAction(), TYPO3\CMS\Install\Controller\EnvironmentController\imageProcessingWritePngAction(), TYPO3\CMS\Core\TypoScript\TemplateService\includeStaticTypoScriptSources(), TYPO3\CMS\Core\Charset\CharsetConverter\initCharset(), TYPO3\CMS\Frontend\Utility\EidUtility\initExtensionTCA(), TYPO3\CMS\Core\Charset\CharsetConverter\initUnicodeData(), TYPO3\CMS\Install\Service\LanguagePackService\languagePackDownload(), TYPO3\CMS\Core\TypoScript\TemplateService\mergeConstantsFromIncludedTsConfigFiles(), TYPO3\CMS\Backend\Controller\NewRecordController\renderNewRecordControls(), TYPO3\CMS\Reports\ViewHelpers\IconViewHelper\renderStatic(), TYPO3\CMS\Backend\Form\Container\AbstractContainer\renderTabMenu(), and TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler\updateStageChangeButtons().

◆ findService()

static mixed TYPO3\CMS\Core\Utility\ExtensionManagementUtility::findService (   $serviceType,
  $serviceSubType = '',
  $excludeServiceKeys = [] 
)
static

Find the available service with highest priority

Parameters
string$serviceTypeService type
string$serviceSubTypeService sub type
mixed$excludeServiceKeysService keys that should be excluded in the search for a service. Array or comma list.
Returns
‪mixed Service info array if a service was found, FALSE otherwise

Definition at line 1112 of file ExtensionManagementUtility.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isServiceAvailable().

◆ findServiceByKey()

static array TYPO3\CMS\Core\Utility\ExtensionManagementUtility::findServiceByKey (   $serviceKey)
static

Find a specific service identified by its key Note that this completely bypasses the notions of priority and quality

Parameters
string$serviceKeyService key
Returns
‪array Service info array if a service was found
Exceptions

Definition at line 1162 of file ExtensionManagementUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Reports\Report\ServicesListReport\getServiceRow().

◆ generateItemList()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::generateItemList ( array  $items,
  $useRawData = false 
)
staticprotected

Generates a list of fields/items out of an array provided by the function getFieldsOfFieldList().

See also
explodeItemList
Parameters
array$items‪The array of fields/items with optional additional information
bool$useRawData‪Use raw data instead of building by using the details (default: FALSE)
Returns
‪string The list of fields/items which gets used for $GLOBALS['TCA'][
‪['types'][<type>]['showitem']

Definition at line 782 of file ExtensionManagementUtility.php.

◆ getBaseTcaCacheIdentifier()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getBaseTcaCacheIdentifier ( )
staticprotected

◆ getCacheManager()

◆ getCN()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getCN (   $key)
static

Returns the correct class name prefix for the extension key $key

Parameters
string$key‪Extension key
Returns
‪string

Definition at line 179 of file ExtensionManagementUtility.php.

Referenced by TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addPItoST43().

◆ getExtensionIcon()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionIcon (   $extensionPath,
  $returnFullPath = false 
)
static

◆ getExtensionKeyByPrefix()

static mixed TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionKeyByPrefix (   $prefix)
static

Returns the real extension key like 'tt_news' from an extension prefix like 'tx_ttnews'.

Parameters
string$prefix‪The extension prefix (e.g. 'tx_ttnews')
Returns
‪mixed Real extension key (string)or FALSE (bool) if something went wrong
Deprecated:
‪since TYPO3 v9, just use the proper extension key directly

Definition at line 191 of file ExtensionManagementUtility.php.

Referenced by TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\getExtensionKeyByPrefixForLoadedExtensionWithoutUnderscoresReturnsExtensionKey(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\getExtensionKeyByPrefixForLoadedExtensionWithUnderscoresReturnsExtensionKey(), and TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\getExtensionKeyByPrefixForNotLoadedExtensionReturnsFalse().

◆ getExtensionVersion()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion (   $key)
static

Retrieves the version of an installed extension. If the extension is not installed, this function returns an empty string.

Parameters
string$key‪The key of the extension to look up, must not be empty
Exceptions

Definition at line 229 of file ExtensionManagementUtility.php.

Referenced by TYPO3\CMS\Extensionmanager\Utility\DependencyUtility\isLoadedVersionCompatible().

◆ getExtLocalconfCacheIdentifier()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtLocalconfCacheIdentifier ( )
staticprotected

◆ getExtTablesCacheIdentifier()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtTablesCacheIdentifier ( )
staticprotected

◆ getFileFieldTCAConfig()

static array TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig (   $fieldName,
array  $customSettingOverride = [],
  $allowedFileExtensions = '',
  $disallowedFileExtensions = '' 
)
static

Gets the TCA configuration for a field handling (FAL) files.

Parameters
string$fieldName‪Name of the field to be used
array$customSettingOverride‪Custom field settings overriding the basics
string$allowedFileExtensions‪Comma list of allowed file extensions (e.g. "jpg,gif,pdf")
string$disallowedFileExtensions
Returns
‪array

Definition at line 562 of file ExtensionManagementUtility.php.

References TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

◆ getLoadedExtensionListArray()

static array TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getLoadedExtensionListArray ( )
static

◆ getSignalSlotDispatcher()

static TYPO3 CMS Extbase SignalSlot Dispatcher TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getSignalSlotDispatcher ( )
staticprotected

Getter for the signal slot dispatcher

Returns
‪\TYPO3\CMS\Extbase\SignalSlot\Dispatcher

Definition at line 94 of file ExtensionManagementUtility.php.

References $signalSlotDispatcher.

◆ insertModuleFunction()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction (   $modname,
  $className,
  $_ = null,
  $title,
  $MM_key = 'function',
  $WS = '' 
)
static

Adds a "Function menu module" ('third level module') to an existing function menu for some other backend module The arguments values are generally determined by which function menu this is supposed to interact with See Inside TYPO3 for information on how to use this function. FOR USE IN ext_tables.php FILES

Parameters
string$modname‪Module name
string$className‪Class name
string$_‪unused
string$title‪Title of module
string$MM_key‪Menu array key - default is "function @param string $WS Workspace conditions. Blank means all workspaces, any other string can be a comma list of "online", "offline" and "custom
See also
‪\TYPO3\CMS\Backend\Module\BaseScriptClass::mergeExternalItems()

Definition at line 962 of file ExtensionManagementUtility.php.

References $GLOBALS.

◆ isLoaded()

static bool TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded (   $key,
  $exitOnError = null 
)
static

Returns TRUE if the extension with extension key $key is loaded.

Parameters
string$key‪Extension key to test
bool$exitOnError‪If $exitOnError is TRUE and the extension is not loaded the function will die with an error message, this is deprecated and will be removed in TYPO3 v10.0.
Returns
‪bool
Exceptions

Definition at line 115 of file ExtensionManagementUtility.php.

Referenced by TYPO3\CMS\Install\Controller\BackendModuleController\applyRsaAuthModules(), TYPO3\CMS\Impexp\Import\checkImportPrerequisites(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkWorkspace(), TYPO3\CMS\Frontend\Page\PageRepository\checkWorkspaceAccess(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\configureBackendLoginSecurity(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\configureFrontendLoginSecurity(), TYPO3\CMS\Impexp\ImportExport\displayContentOverview(), TYPO3\CMS\Extensionmanager\Controller\ListController\distributionsAction(), TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterUninstallExtensionAction(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroupData(), TYPO3\CMS\Backend\Utility\BackendUtility\fixVersioningPid(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getDefaultWorkspace(), TYPO3\CMS\Backend\Backend\ToolbarItems\UserToolbarItem\getDropDown(), TYPO3\CMS\Fluid\View\TemplatePaths\getExtensionPrivateResourcesPath(), TYPO3\CMS\Backend\Utility\BackendUtility\getLiveVersionIdOfRecord(), TYPO3\CMS\Adminpanel\Modules\EditModule\getPageSettings(), TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController\getPagesTSconfig(), TYPO3\CMS\Backend\Utility\BackendUtility\getRawPagesTSconfig(), TYPO3\CMS\Backend\Template\DocumentTemplate\getSkinStylesheetDirectories(), TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getSystemLanguages(), TYPO3\CMS\Backend\View\PageLayoutView\getTableMenu(), TYPO3\CMS\Backend\Utility\BackendUtility\getWorkspaceVersionOfRecord(), TYPO3\CMS\Core\TypoScript\TemplateService\includeStaticTypoScriptSources(), TYPO3\CMS\Adminpanel\Modules\EditModule\initializeModule(), TYPO3\CMS\Extensionmanager\Controller\DownloadController\installDistributionAction(), TYPO3\CMS\Extensionmanager\Utility\DependencyUtility\isDependentExtensionLoaded(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\isLoadedReturnsFalseIfExtensionIsNotLoadedAndExitIsDisabled(), TYPO3\CMS\Core\DataHandling\PlainDataResolver\isWorkspaceEnabled(), TYPO3\CMS\Core\Database\QueryView\makeStoreControl(), TYPO3\CMS\Core\TypoScript\TemplateService\mergeConstantsFromIncludedTsConfigFiles(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\modAccess(), TYPO3\CMS\Backend\Clipboard\Clipboard\printClipboard(), TYPO3\CMS\Core\Database\QueryView\procesStoreControl(), TYPO3\CMS\Belog\ViewHelpers\WorkspaceTitleViewHelper\renderStatic(), TYPO3\CMS\Backend\Controller\Page\TreeController\resolvePageCssClassNames(), TYPO3\CMS\Core\Tests\Functional\Package\RuntimeActivatedPackagesTest\runtimeActivatedPackageIsLoaded(), TYPO3\CMS\Core\Database\QueryView\saveQueryInAction(), TYPO3\CMS\Install\Updates\RteHtmlAreaExtractionUpdate\updateNecessary(), TYPO3\CMS\Install\Updates\Typo3DbExtractionUpdate\updateNecessary(), TYPO3\CMS\Install\Updates\AdminPanelInstall\updateNecessary(), TYPO3\CMS\Install\Updates\FuncExtractionUpdate\updateNecessary(), TYPO3\CMS\Install\Updates\FormLegacyExtractionUpdate\updateNecessary(), TYPO3\CMS\Install\Updates\RedirectExtractionUpdate\updateNecessary(), TYPO3\CMS\Install\Updates\Compatibility7ExtractionUpdate\updateNecessary(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\workspaceCheckStageForCurrent(), and TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL().

◆ isServiceAvailable()

static bool TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isServiceAvailable (   $serviceType,
  $serviceKey,
  $serviceDetails 
)
static

Check if a given service is available, based on the executable files it depends on

Parameters
string$serviceTypeType of service
string$serviceKey‪Specific key of the service
array$serviceDetailsInformation about the service
Returns
‪bool Service availability

Definition at line 1189 of file ExtensionManagementUtility.php.

References TYPO3\CMS\Core\Utility\CommandUtility\checkCommand(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\deactivateService().

Referenced by TYPO3\CMS\Core\Utility\ExtensionManagementUtility\findService().

◆ loadBaseTca()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadBaseTca (   $allowCaching = true,
FrontendInterface  $codeCache = null 
)
static

Wrapper for buildBaseTcaFromSingleFiles handling caching.

This builds 'base' TCA that is later overloaded by ext_tables.php.

Use a cache file if exists and caching is allowed.

This is an internal method. It is only used during bootstrap and extensions should not use it!

Parameters
bool$allowCaching‪Whether or not to load / create concatenated cache file

Definition at line 1646 of file ExtensionManagementUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Cache\CacheManager\getCache(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getCacheManager().

Referenced by TYPO3\CMS\Frontend\Utility\EidUtility\initTCA(), and TYPO3\CMS\Core\Core\Bootstrap\loadBaseTca().

◆ loadExtension()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtension (   $extensionKey)
static

Loads given extension

Warning: This method only works if the ugrade wizard to transform localconf.php to LocalConfiguration.php was already run

Parameters
string$extensionKey‪Extension key to load
Exceptions

Definition at line 1923 of file ExtensionManagementUtility.php.

◆ loadExtLocalconf()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtLocalconf (   $allowCaching = true,
FrontendInterface  $codeCache = null 
)
static

Execute all ext_localconf.php files of loaded extensions. The method implements an optionally used caching mechanism that concatenates all ext_localconf.php files in one file.

This is an internal method. It is only used during bootstrap and extensions should not use it!

Parameters
bool$allowCaching‪Whether or not to load / create concatenated cache file
FrontendInterface$codeCache

Definition at line 1543 of file ExtensionManagementUtility.php.

References TYPO3\CMS\Core\Utility\ExtensionManagementUtility\createExtLocalconfCacheEntry(), TYPO3\CMS\Core\Cache\CacheManager\getCache(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getCacheManager(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getExtLocalconfCacheIdentifier(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\loadSingleExtLocalconfFiles().

Referenced by TYPO3\CMS\Core\Core\Bootstrap\loadTypo3LoadedExtAndExtLocalconf(), and TYPO3\CMS\Extensionmanager\Utility\InstallUtility\reloadCaches().

◆ loadExtTables()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtTables (   $allowCaching = true)
static

Execute all ext_tables.php files of loaded extensions. The method implements an optionally used caching mechanism that concatenates all ext_tables.php files in one file.

This is an internal method. It is only used during bootstrap and extensions should not use it!

Parameters
bool$allowCaching‪Whether to load / create concatenated cache file

Definition at line 1789 of file ExtensionManagementUtility.php.

References TYPO3\CMS\Core\Utility\ExtensionManagementUtility\createExtTablesCacheEntry(), TYPO3\CMS\Core\Cache\CacheManager\getCache(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getCacheManager(), TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getExtTablesCacheIdentifier(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\loadSingleExtTablesFiles().

Referenced by TYPO3\CMS\Core\Core\Bootstrap\loadExtTables().

◆ loadSingleExtLocalconfFiles()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadSingleExtLocalconfFiles ( )
staticprotected

◆ loadSingleExtTablesFiles()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadSingleExtTablesFiles ( )
staticprotected

Load ext_tables.php as single files

Definition at line 1810 of file ExtensionManagementUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Utility\ExtensionManagementUtility\loadExtTables().

◆ makeCategorizable()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable (   $extensionKey,
  $tableName,
  $fieldName = 'categories',
array  $options = [],
  $override = false 
)
static

Makes a table categorizable by adding value into the category registry. FOR USE IN ext_localconf.php FILES or files in Configuration/TCA/Overrides/*.php Use the latter to benefit from TCA caching!

Parameters
string$extensionKey‪Extension key to be used
string$tableName‪Name of the table to be categorized
string$fieldName‪Name of the field to be used to store categories
array$options‪Additional configuration options
bool$override‪If TRUE, any category configuration for the same table / field is removed before the new configuration is added
See also
addTCAcolumns
addToAllTCAtypes

Definition at line 1960 of file ExtensionManagementUtility.php.

References TYPO3\CMS\Core\Category\CategoryRegistry\add(), and TYPO3\CMS\Core\Category\CategoryRegistry\getInstance().

◆ registerPageTSConfigFile()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile (   $extKey,
  $filePath,
  $title 
)
static

Call this method to add an entry in the pageTSconfig list found in pages FOR USE in Configuration/TCA/Overrides/pages.php

Parameters
string$extKey‪The extension key
string$filePath‪The path where the TSconfig file is located
string$title‪The title in the selector box
Exceptions

Definition at line 1401 of file ExtensionManagementUtility.php.

References $GLOBALS.

◆ removeCacheFiles()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::removeCacheFiles ( )
static

Remove cache files from php code cache, grouped by 'system'

This removes the following cache entries:

  • ‪autoloader cache registry
  • ‪cache loaded extension array
  • ‪ext_localconf concatenation
  • ‪ext_tables concatenation

This method is usually only used by extension that fiddle with the loaded extensions. An example is the extension manager and the install tool.

Deprecated:
‪CacheManager provides the functionality directly

Definition at line 1898 of file ExtensionManagementUtility.php.

References TYPO3\CMS\Core\Cache\CacheManager\flushCachesInGroup(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\getCacheManager().

Referenced by TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\removeCacheFilesFlushesSystemCaches().

◆ removeDuplicatesForInsertion()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::removeDuplicatesForInsertion (   $insertionList,
  $list = '' 
)
staticprotected

Compares an existing list of items and a list of items to be inserted and returns a duplicate-free variant of that insertion list.

Example:

  • ‪list: 'field_a, field_b, field_c'
  • ‪insertion: 'field_b, field_d, field_c' -> new insertion: 'field_d'

Duplicate values in $insertionList are removed.

Parameters
string$insertionList‪The list of items to inserted
string$list‪The list of items to be extended (default: '')
Returns
‪string Duplicate-free list of items to be inserted

Reimplemented in TYPO3\CMS\Core\Tests\Unit\Utility\AccessibleProxies\ExtensionManagementUtilityAccessibleProxy.

Definition at line 717 of file ExtensionManagementUtility.php.

Referenced by TYPO3\CMS\Core\Utility\ExtensionManagementUtility\addFieldsToPalette(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\executePositionedStringInsertion().

◆ setPackageManager()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::setPackageManager ( PackageManager  $packageManager)
static

Sets the package manager for all that backwards compatibility stuff, so it doesn't have to be fetched through the bootstap.

Parameters
PackageManager$packageManager

Definition at line 63 of file ExtensionManagementUtility.php.

References TYPO3\CMS\Core\Utility\ExtensionManagementUtility\$packageManager.

Referenced by TYPO3\CMS\Install\Tests\Unit\Service\SilentConfigurationUpgradeServiceTest\configureBackendLoginSecurity(), TYPO3\CMS\Install\Tests\Unit\Service\SilentConfigurationUpgradeServiceTest\configureFrontendLoginSecurity(), TYPO3\CMS\Core\Tests\Unit\TypoScript\TemplateServiceTest\extensionStaticsAreProcessedIfExplicitlyRequested(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\extPathAppendsScriptNameToPath(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\extPathThrowsExceptionIfExtensionIsNotLoaded(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\getExtensionKeyByPrefixForLoadedExtensionWithoutUnderscoresReturnsExtensionKey(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\getExtensionKeyByPrefixForLoadedExtensionWithUnderscoresReturnsExtensionKey(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\getFileAbsFileNameReturnsCorrectValues(), TYPO3\CMS\Core\Core\Bootstrap\init(), TYPO3\CMS\Core\Core\Bootstrap\initializePackageManagement(), TYPO3\CMS\Core\Core\Bootstrap\loadConfigurationAndInitialize(), TYPO3\CMS\Core\Tests\UnitDeprecated\Utility\ExtensionManagementUtilityTest\tearDown(), TYPO3\CMS\Install\Tests\Unit\Service\SilentConfigurationUpgradeServiceTest\tearDown(), TYPO3\CMS\Core\Tests\Unit\TypoScript\TemplateServiceTest\tearDown(), and TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\tearDown().

◆ siteRelPath()

static string TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath (   $key)
static

Returns the relative path to the extension as measured from the public web path If the extension is not loaded the function will die with an error message Useful for images and links from the frontend

Parameters
string$key‪Extension key
Returns
‪string
Deprecated:
‪use extPath() or GeneralUtility::getFileAbsFileName() together with PathUtility::getAbsoluteWebPath() instead.

Definition at line 166 of file ExtensionManagementUtility.php.

References TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

◆ unloadExtension()

static TYPO3\CMS\Core\Utility\ExtensionManagementUtility::unloadExtension (   $extensionKey)
static

Unloads given extension

Warning: This method only works if the ugrade wizard to transform localconf.php to LocalConfiguration.php was already run

Parameters
string$extensionKey‪Extension key to remove
Exceptions

Definition at line 1940 of file ExtensionManagementUtility.php.

Referenced by TYPO3\CMS\Install\Controller\UpgradeController\extensionCompatTesterUninstallExtensionAction().

Member Data Documentation

◆ $cacheManager

TYPO3 CMS Core Cache CacheManager TYPO3\CMS\Core\Utility\ExtensionManagementUtility::$cacheManager
staticprotected

◆ $extensionKeyMap

array TYPO3\CMS\Core\Utility\ExtensionManagementUtility::$extensionKeyMap
staticprotected

Definition at line 39 of file ExtensionManagementUtility.php.

◆ $extTablesWasReadFromCacheOnce

bool TYPO3\CMS\Core\Utility\ExtensionManagementUtility::$extTablesWasReadFromCacheOnce = false
staticprotected

TRUE, if ext_tables file was read from cache for this script run. The frontend tends to do that multiple times, but the caching framework does not allow this (via a require_once call). This variable is used to track the access to the cache file to read the single ext_tables.php if it was already read from cache

Todo:
‪See if we can get rid of the 'load multiple times' scenario in fe

Definition at line 50 of file ExtensionManagementUtility.php.

◆ $packageManager

PackageManager TYPO3\CMS\Core\Utility\ExtensionManagementUtility::$packageManager
staticprotected

◆ $signalSlotDispatcher

TYPO3 CMS Extbase SignalSlot Dispatcher TYPO3\CMS\Core\Utility\ExtensionManagementUtility::$signalSlotDispatcher
staticprotected

Definition at line 87 of file ExtensionManagementUtility.php.