[TASK] Use new way to register forms wizard 47/27947/4
authorAlexander Schnitzler <typo3@alexanderschnitzler.de>
Fri, 28 Feb 2014 14:42:22 +0000 (15:42 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 28 Feb 2014 19:23:52 +0000 (20:23 +0100)
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
typo3/sysext/backend/Modules/Wizards/FormsWizard/conf.php [new file with mode: 0644]
typo3/sysext/backend/Modules/Wizards/FormsWizard/index.php [new file with mode: 0644]
typo3/sysext/backend/ext_tables.php
typo3/sysext/frontend/Configuration/TCA/tt_content.php
typo3/wizard_forms.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 (file)
index 0000000..83321a8
--- /dev/null
@@ -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 (file)
index 0000000..855f226
--- /dev/null
@@ -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();
index d141315..87a427d 100644 (file)
@@ -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
index 5407106..91b713d 100644 (file)
@@ -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
                                                )
index 462548a..a2f32e3 100644 (file)
@@ -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();