From 76771a2c2ab0d98606fc9489a3971228fda8f3b4 Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Thu, 11 May 2023 15:06:23 +0200 Subject: [PATCH] chore: refactor addEventListenerCompatibilityForPlugins --- src/Resources/public/js/pimcore/perspective/events.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Resources/public/js/pimcore/perspective/events.js b/src/Resources/public/js/pimcore/perspective/events.js index 990ba80..1f31a5d 100644 --- a/src/Resources/public/js/pimcore/perspective/events.js +++ b/src/Resources/public/js/pimcore/perspective/events.js @@ -25,12 +25,11 @@ pimcore.events.onPerspectiveEditorLoadStructureForPermissions = "pimcore.perspec -//TODO: delete in Pimcore11 and update dependency in composer.json +//TODO: delete once support for Pimcore 10.6 is dropped if(typeof addEventListenerCompatibilityForPlugins === "function") { let eventMappings = []; eventMappings["onPerspectiveEditorLoadPermissions"] = pimcore.events.onPerspectiveEditorLoadPermissions; eventMappings["onPerspectiveEditorLoadStructureForPermissions"] = pimcore.events.onPerspectiveEditorLoadStructureForPermissions; addEventListenerCompatibilityForPlugins(eventMappings); -} else { - console.error("Delete addEventListenerCompatibilityForPlugins in the perspective-editor") + console.warn("Deprecation: addEventListenerCompatibilityForPlugins will be not supported in Pimcore 11."); }