From b6bafa9211fac0220c12b475a120fd005aab7cd2 Mon Sep 17 00:00:00 2001 From: Alexander Schnitzler <typo3@alexanderschnitzler.de> Date: Fri, 28 Feb 2014 15:42:22 +0100 Subject: [PATCH] [TASK] Use new way to register forms wizard Resolves: #56438 Releases: 6.2 Change-Id: Ic5a22f6ded5bf3b5d8a6442497444296a6b3bfaa Reviewed-on: https://review.typo3.org/27947 Reviewed-by: Helmut Hummel Tested-by: Helmut Hummel Reviewed-by: Wouter Wolters Tested-by: Wouter Wolters --- .../Modules/Wizards/FormsWizard/conf.php | 6 ++++ .../Modules/Wizards/FormsWizard/index.php | 33 +++++++++++++++++++ typo3/sysext/backend/ext_tables.php | 6 ++++ .../frontend/Configuration/TCA/tt_content.php | 7 +++- typo3/wizard_forms.php | 3 ++ 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 typo3/sysext/backend/Modules/Wizards/FormsWizard/conf.php create mode 100644 typo3/sysext/backend/Modules/Wizards/FormsWizard/index.php diff --git a/typo3/sysext/backend/Modules/Wizards/FormsWizard/conf.php b/typo3/sysext/backend/Modules/Wizards/FormsWizard/conf.php new file mode 100644 index 000000000000..83321a89b7c4 --- /dev/null +++ b/typo3/sysext/backend/Modules/Wizards/FormsWizard/conf.php @@ -0,0 +1,6 @@ +<?php +//required for mod.php +$MCONF['name'] = 'wizard_forms'; +$MCONF['script'] = '_DISPATCH'; +$MCONF['access'] = ''; +?> diff --git a/typo3/sysext/backend/Modules/Wizards/FormsWizard/index.php b/typo3/sysext/backend/Modules/Wizards/FormsWizard/index.php new file mode 100644 index 000000000000..855f226deabe --- /dev/null +++ b/typo3/sysext/backend/Modules/Wizards/FormsWizard/index.php @@ -0,0 +1,33 @@ +<?php +/*************************************************************** + * Copyright notice + * + * (c) 2014 Alexander Schnitzler (typo3@alexanderschnitzler.de) + * All rights reserved + * + * This script is part of the TYPO3 project. The TYPO3 project is + * free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * The GNU General Public License can be found at + * http://www.gnu.org/copyleft/gpl.html. + * A copy is found in the text file GPL.txt and important notices to the license + * from the author is found in LICENSE.txt distributed with these scripts. + * + * + * This script is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * This copyright notice MUST APPEAR in all copies of the script! + ***************************************************************/ + +/** + * Wizard to create/edit forms in TCEforms + */ +$formsController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\Wizard\\FormsController'); +$formsController->main(); +$formsController->printContent(); diff --git a/typo3/sysext/backend/ext_tables.php b/typo3/sysext/backend/ext_tables.php index d141315fafc0..87a427d9dde0 100644 --- a/typo3/sysext/backend/ext_tables.php +++ b/typo3/sysext/backend/ext_tables.php @@ -27,4 +27,10 @@ if (TYPO3_MODE === 'BE') { 'wizard_table', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/TableWizard/' ); + + // Register forms wizard + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath( + 'wizard_forms', + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/FormsWizard/' + ); } \ No newline at end of file diff --git a/typo3/sysext/frontend/Configuration/TCA/tt_content.php b/typo3/sysext/frontend/Configuration/TCA/tt_content.php index 54071062b1e1..91b713d84822 100644 --- a/typo3/sysext/frontend/Configuration/TCA/tt_content.php +++ b/typo3/sysext/frontend/Configuration/TCA/tt_content.php @@ -496,7 +496,12 @@ return array( 'type' => 'script', 'title' => 'LLL:EXT:cms/locallang_ttc.xlf:bodytext.W.forms', 'icon' => 'wizard_forms.gif', - 'script' => 'wizard_forms.php?special=formtype_mail', + 'module' => array( + 'name' => 'wizard_forms', + 'urlParameters' => array( + 'special' => 'formtype_mail' + ) + ), 'params' => array( 'xmlOutput' => 0 ) diff --git a/typo3/wizard_forms.php b/typo3/wizard_forms.php index 462548a88c10..a2f32e3cd96d 100644 --- a/typo3/wizard_forms.php +++ b/typo3/wizard_forms.php @@ -32,6 +32,9 @@ */ require __DIR__ . '/init.php'; +\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('The way registering a wizard in TCA has chan +ged in 6.2. Please set module[name]=wizard_forms instead of script=wizard_forms.php in your TCA. This +script will be removed in two versions.'); $formsController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\Wizard\\FormsController'); $formsController->main(); $formsController->printContent(); -- GitLab