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
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook']
which has been in place for a long time should be used instead.

Resolves: #95343
Releases: master
Change-Id: I248671e4b897c087df81ff8b81b4239c525a510f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71218

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
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`
Description
===========
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.
Impact
======
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.
Migration
=========
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 [
'Deprecation-95322-LegacyElementBrowserLogic.rst',
],
],
'$GLOBALS[\'TBE_MODULES_EXT\'][\'xMOD_db_new_content_el\'][\'addElClasses\']' => [
'restFiles' => [
'Deprecation-95343-LegacyHookForNewContentElementWizard.rst',
],
],
];
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