From 19a4d2b4f347dce2ce0b63f7f0ae8df4c224e1ae Mon Sep 17 00:00:00 2001 From: Benni Mack Date: Wed, 17 May 2017 07:30:18 +0200 Subject: [PATCH] [!!!][TASK] Remove deprecated Fluid Viewhelper arguments Remove arguments within f:be.container and f:be.pageRenderer which have been marked as deprecated before: * f:be.container->enableClickMenu * f:be.container->loadExtJs * f:be.container->loadExtJsTheme * f:be.container->enableExtJsDebug * f:be.container->loadJQuery * f:be.container->jQueryNamespace * f:be.pageRenderer->loadExtJs * f:be.pageRenderer->loadExtJsTheme * f:be.pageRenderer->enableExtJsDebug * f:be.pageRenderer->loadJQuery * f:be.pageRenderer->jQueryNamespace Resolves: #80707 Releases: master Change-Id: If1f36b3fb197e108cb12351145e312a5aaca6447 Reviewed-on: https://review.typo3.org/52520 Tested-by: TYPO3com Reviewed-by: Georg Ringer Tested-by: Georg Ringer Reviewed-by: Wouter Wolters Tested-by: Wouter Wolters --- ...g-80700-DeprecatedFunctionalityRemoved.rst | 13 +++++ .../ViewHelpers/Be/ContainerViewHelper.php | 52 +------------------ .../ViewHelpers/Be/PageRendererViewHelper.php | 40 +------------- 3 files changed, 17 insertions(+), 88 deletions(-) diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst index b56d62f08016..3e343515b24e 100644 --- a/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst @@ -340,6 +340,19 @@ The following icon identifiers have been removed: * actions-document-close * actions-edit-add +The following Fluid ViewHelper arguments have been removed: +* f:be.container->enableClickMenu +* f:be.container->loadExtJs +* f:be.container->loadExtJsTheme +* f:be.container->enableExtJsDebug +* f:be.container->loadJQuery +* f:be.container->jQueryNamespace +* f:be.pageRenderer->loadExtJs +* f:be.pageRenderer->loadExtJsTheme +* f:be.pageRenderer->enableExtJsDebug +* f:be.pageRenderer->loadJQuery +* f:be.pageRenderer->jQueryNamespace + The following requireJS modules have been removed: * TYPO3/CMS/Core/QueryGenerator diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php index 63cdf25c09d9..c074f08b4b23 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php @@ -14,7 +14,6 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Be; * The TYPO3 project - inspiring people to share! */ -use TYPO3\CMS\Core\Page\PageRenderer; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Utility\LocalizationUtility; @@ -32,13 +31,13 @@ use TYPO3\CMS\Extbase\Utility\LocalizationUtility; * * * - * your module content + * your module content * * * "your module content" wrapped with proper head & body tags. * Custom CSS file EXT:your_extension/Resources/Public/Css/styles.css and * JavaScript files EXT:your_extension/Resources/Public/JavaScript/Library1.js and EXT:your_extension/Resources/Public/JavaScript/Library2.js - * will be loaded, plus ExtJS and jQuery and some inline labels for usage in JS code. + * will be loaded, plus some inline labels for usage in JS code. * */ class ContainerViewHelper extends AbstractBackendViewHelper @@ -57,16 +56,10 @@ class ContainerViewHelper extends AbstractBackendViewHelper { parent::initializeArguments(); $this->registerArgument('pageTitle', 'string', 'Title tag of the module. Not required by default, as BE modules are shown in a frame', false, ''); - $this->registerArgument('enableClickMenu', 'bool', 'If TRUE, loads clickmenu.js required by BE context menus. Defaults to TRUE. This option will be removed in TYPO3 v9', false, true); - $this->registerArgument('loadExtJs', 'bool', 'Specifies whether to load ExtJS library. Defaults to FALSE. This option will be removed in TYPO3 v9', false, false); - $this->registerArgument('loadExtJsTheme', 'bool', 'Whether to load ExtJS "grey" theme. Defaults to FALSE. This option will be removed in TYPO3 v9', false, true); - $this->registerArgument('enableExtJsDebug', 'bool', 'If TRUE, debug version of ExtJS is loaded. Use this for development only. This option will be removed in TYPO3 v9', false, false); - $this->registerArgument('loadJQuery', 'bool', 'Whether to load jQuery library. Defaults to FALSE. This option will be removed in TYPO3 v9', false, false); $this->registerArgument('includeCssFiles', 'array', 'List of custom CSS file to be loaded'); $this->registerArgument('includeJsFiles', 'array', 'List of custom JavaScript file to be loaded'); $this->registerArgument('addJsInlineLabels', 'array', 'Custom labels to add to JavaScript inline labels'); $this->registerArgument('includeRequireJsModules', 'array', 'List of RequireJS modules to be loaded'); - $this->registerArgument('jQueryNamespace', 'string', 'Store the jQuery object in a specific namespace. This option will be removed in TYPO3 v9'); } /** @@ -79,56 +72,15 @@ class ContainerViewHelper extends AbstractBackendViewHelper public function render() { $pageTitle = $this->arguments['pageTitle']; - $enableClickMenu = $this->arguments['enableClickMenu']; - $loadExtJs = $this->arguments['loadExtJs']; - $loadExtJsTheme = $this->arguments['loadExtJsTheme']; - $enableExtJsDebug = $this->arguments['enableExtJsDebug']; - $loadJQuery = $this->arguments['loadJQuery']; $includeCssFiles = $this->arguments['includeCssFiles']; $includeJsFiles = $this->arguments['includeJsFiles']; $addJsInlineLabels = $this->arguments['addJsInlineLabels']; $includeRequireJsModules = $this->arguments['includeRequireJsModules']; - $jQueryNamespace = $this->arguments['jQueryNamespace']; $pageRenderer = $this->getPageRenderer(); $doc = $this->getDocInstance(); $doc->JScode .= GeneralUtility::wrapJS($doc->redirectUrls()); - // Load various standard libraries - if ($enableClickMenu) { - GeneralUtility::logDeprecatedViewHelperAttribute( - 'enableClickMenu', - $this->renderingContext, - 'Setting "enableClickMenu" in Container ViewHelper is deprecated, the option will be removed in TYPO3 v9' - ); - $pageRenderer->loadJquery(); - $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextMenu'); - } - if ($loadExtJs) { - GeneralUtility::logDeprecatedViewHelperAttribute( - 'loadExtJs', - $this->renderingContext, - 'Setting "loadExtJs" and "loadExtJsTheme" in Container ViewHelper is deprecated, the option will be removed in TYPO3 v9' - ); - $pageRenderer->loadExtJS(true, $loadExtJsTheme); - if ($enableExtJsDebug) { - GeneralUtility::logDeprecatedViewHelperAttribute( - 'enableExtJsDebug', - $this->renderingContext, - 'Setting "enableExtJsDebug" in Container ViewHelper is deprecated, the option will be removed in TYPO3 v9' - ); - $pageRenderer->enableExtJsDebug(); - } - } - if ($loadJQuery) { - GeneralUtility::logDeprecatedViewHelperAttribute( - 'loadjQuery', - $this->renderingContext, - 'Setting "loadjQuery" and "jQueryNamespace" in Container ViewHelper are deprecated, the option will be removed in TYPO3 v9' - ); - $jQueryNamespace = $jQueryNamespace ?: PageRenderer::JQUERY_NAMESPACE_DEFAULT; - $pageRenderer->loadJquery(null, null, $jQueryNamespace); - } // Include custom CSS and JS files if (is_array($includeCssFiles) && count($includeCssFiles) > 0) { foreach ($includeCssFiles as $addCssFile) { diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageRendererViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageRendererViewHelper.php index 2036f1b8a908..eb60cc070baf 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageRendererViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageRendererViewHelper.php @@ -15,7 +15,6 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Be; */ use TYPO3\CMS\Core\Page\PageRenderer; -use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Utility\LocalizationUtility; use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper; @@ -25,13 +24,13 @@ use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper; * = Examples = * * - * + * * * * * Custom CSS file EXT:your_extension/Resources/Public/Css/styles.css and * JavaScript files EXT:your_extension/Resources/Public/JavaScript/Library1.js and EXT:your_extension/Resources/Public/JavaScript/Library2.js - * will be loaded, plus ExtJS and jQuery and some inline labels for usage in JS code. + * will be loaded, plus some inline labels for usage in JS code. * */ class PageRendererViewHelper extends AbstractViewHelper @@ -58,15 +57,10 @@ class PageRendererViewHelper extends AbstractViewHelper { parent::initializeArguments(); $this->registerArgument('pageTitle', 'string', 'title tag of the module. Not required by default, as BE modules are shown in a frame', false, ''); - $this->registerArgument('loadExtJs', 'bool', 'specifies whether to load ExtJS library. Defaults to FALSE. This option will be removed in TYPO3 v9', false, false); - $this->registerArgument('loadExtJsTheme', 'bool', 'whether to load ExtJS "grey" theme. Defaults to FALSE. This option will be removed in TYPO3 v9', false, true); - $this->registerArgument('enableExtJsDebug', 'bool', 'if TRUE, debug version of ExtJS is loaded. Use this for development only. This option will be removed in TYPO3 v9', false, false); - $this->registerArgument('loadJQuery', 'bool', 'whether to load jQuery library. Defaults to FALSE. This option will be removed in TYPO3 v9', false, false); $this->registerArgument('includeCssFiles', 'array', 'List of custom CSS file to be loaded'); $this->registerArgument('includeJsFiles', 'array', 'List of custom JavaScript file to be loaded'); $this->registerArgument('addJsInlineLabels', 'array', 'Custom labels to add to JavaScript inline labels'); $this->registerArgument('includeRequireJsModules', 'array', 'List of RequireJS modules to be loaded'); - $this->registerArgument('jQueryNamespace', 'string', 'Store the jQuery object in a specific namespace. This option will be removed in TYPO3 v9'); $this->registerArgument('addInlineSettings', 'array', 'Adds Javascript Inline Setting'); } @@ -76,45 +70,15 @@ class PageRendererViewHelper extends AbstractViewHelper public function render() { $pageTitle = $this->arguments['pageTitle']; - $loadExtJs = $this->arguments['loadExtJs']; - $loadExtJsTheme = $this->arguments['loadExtJsTheme']; - $enableExtJsDebug = $this->arguments['enableExtJsDebug']; - $loadJQuery = $this->arguments['loadJQuery']; $includeCssFiles = $this->arguments['includeCssFiles']; $includeJsFiles = $this->arguments['includeJsFiles']; $addJsInlineLabels = $this->arguments['addJsInlineLabels']; $includeRequireJsModules = $this->arguments['includeRequireJsModules']; - $jQueryNamespace = $this->arguments['jQueryNamespace']; $addInlineSettings = $this->arguments['addInlineSettings']; if ($pageTitle) { $this->pageRenderer->setTitle($pageTitle); } - if ($loadExtJs) { - GeneralUtility::logDeprecatedViewHelperAttribute( - 'loadExtJs', - $this->renderingContext, - 'Setting "loadExtJs" and "loadExtJsTheme" in PageRenderer ViewHelper is deprecated, the option will be removed in TYPO3 v9' - ); - $this->pageRenderer->loadExtJS(true, $loadExtJsTheme); - if ($enableExtJsDebug) { - GeneralUtility::logDeprecatedViewHelperAttribute( - 'enableExtJsDebug', - $this->renderingContext, - 'Setting "enableExtJsDebug" in PageRenderer ViewHelper is deprecated, the option will be removed in TYPO3 v9' - ); - $this->pageRenderer->enableExtJsDebug(); - } - } - if ($loadJQuery) { - GeneralUtility::logDeprecatedViewHelperAttribute( - 'loadjQuery', - $this->renderingContext, - 'Setting "loadjQuery" and "jQueryNamespace" in PageRenderer ViewHelper are deprecated, the option will be removed in TYPO3 v9' - ); - $jQueryNamespace = $jQueryNamespace ?: PageRenderer::JQUERY_NAMESPACE_DEFAULT; - $this->pageRenderer->loadJquery(null, null, $jQueryNamespace); - } // Include custom CSS and JS files if (is_array($includeCssFiles) && count($includeCssFiles) > 0) { foreach ($includeCssFiles as $addCssFile) { -- 2.20.1