Commit cdfab293 authored by Benni Mack's avatar Benni Mack Committed by Oliver Hader
Browse files

[TASK] Deprecate legacy hook for new content element wizard

The hook "$GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses']"
is now marked as deprecated, as the
which has been in place for a long time should be used instead.

Resolves: #95343
Releases: master
Change-Id: I248671e4b897c087df81ff8b81b4239c525a510f

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Tested-by: Oliver Hader's avatarOliver Hader <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Oliver Hader's avatarOliver Hader <>
parent 8e0125d9
......@@ -352,8 +352,12 @@ class NewContentElementController
protected function getAppendWizards(array $wizardElements): array
// @deprecated will be removed in TYPO3 v12.0.
$classes = $GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'] ?? [];
if (is_array($classes)) {
if (!empty($classes)) {
trigger_error('The hook $TBE_MODULES_EXT[xMOD_db_new_content_el][addElClasses] will be removed in TYPO3 v12.0. Use $GLOBALS[TYPO3_CONF_VARS][SC_OPTIONS][cms][db_new_content_el][wizardItemsHook] instead.', E_USER_DEPRECATED);
foreach ($classes as $class => $path) {
if (!class_exists($class) && file_exists($path)) {
require_once $path;
.. include:: ../../Includes.txt
Deprecation: #95343 - Legacy hook for new content element wizard
See :issue:`95343`
The hook :php:`$GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses']` which has been
used primarily back in TYPO3 v4.x times with the Extension Kickstarter for Pi-Based Plugins has been deprecated.
When an extension is registering a hook, and the New Content Element Wizard is called, a PHP deprecation message is triggered.
Affected Installations
TYPO3 installations with third-party extensions using this hook.
The alternative hook :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook']`
can be used instead, which allows to modify and add wizard items
as well.
.. index:: Backend, PHP-API, FullyScanned, ext:backend
\ No newline at end of file
......@@ -532,4 +532,9 @@ return [
'$GLOBALS[\'TBE_MODULES_EXT\'][\'xMOD_db_new_content_el\'][\'addElClasses\']' => [
'restFiles' => [
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment