[TASK] Use new way to register table wizard 42/27942/3
authorAlexander Schnitzler <typo3@alexanderschnitzler.de>
Fri, 28 Feb 2014 13:37:31 +0000 (14:37 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 28 Feb 2014 19:16:00 +0000 (20:16 +0100)
Resolves: #56435
Releases: 6.2
Change-Id: I180929980ade8c26a6e086f2f65d2e76cbeb19cd
Reviewed-on: https://review.typo3.org/27942
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/backend/Modules/Wizards/TableWizard/conf.php [new file with mode: 0644]
typo3/sysext/backend/Modules/Wizards/TableWizard/index.php [new file with mode: 0644]
typo3/sysext/backend/ext_tables.php
typo3/sysext/frontend/Configuration/TCA/tt_content.php
typo3/sysext/t3editor/ext_tables.php
typo3/wizard_table.php

diff --git a/typo3/sysext/backend/Modules/Wizards/TableWizard/conf.php b/typo3/sysext/backend/Modules/Wizards/TableWizard/conf.php
new file mode 100644 (file)
index 0000000..04dceb5
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+//required for mod.php
+$MCONF['name'] = 'wizard_table';
+$MCONF['script'] = '_DISPATCH';
+$MCONF['access'] = '';
+?>
diff --git a/typo3/sysext/backend/Modules/Wizards/TableWizard/index.php b/typo3/sysext/backend/Modules/Wizards/TableWizard/index.php
new file mode 100644 (file)
index 0000000..c53c30c
--- /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 tables in TCEforms
+ */
+$tableController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\Wizard\\TableController');
+$tableController->main();
+$tableController->printContent();
index 5463d10..d141315 100644 (file)
@@ -21,4 +21,10 @@ if (TYPO3_MODE === 'BE') {
                'wizard_list',
                \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/ListWizard/'
        );
+
+       // Register table wizard
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
+               'wizard_table',
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/TableWizard/'
+       );
 }
\ No newline at end of file
index 643070a..5407106 100644 (file)
@@ -483,7 +483,9 @@ return array(
                                                'type' => 'script',
                                                'title' => 'LLL:EXT:cms/locallang_ttc.xlf:bodytext.W.table',
                                                'icon' => 'wizard_table.gif',
-                                               'script' => 'wizard_table.php',
+                                               'module' => array(
+                                                       'name' => 'wizard_table'
+                                               ),
                                                'params' => array(
                                                        'xmlOutput' => 0
                                                )
index 81e018c..2ec0eeb 100644 (file)
@@ -18,7 +18,9 @@ if (TYPO3_MODE === 'BE') {
                'userFunc' => 'TYPO3\\CMS\\T3editor\\FormWizard->main',
                'title' => 't3editor',
                'icon' => 'wizard_table.gif',
-               'script' => 'wizard_table.php',
+               'module' => array(
+                       'name' => 'wizard_table'
+               ),
                'params' => array(
                        'format' => 'html',
                        'style' => 'width:98%; height: 60%;'
index 74fdcbd..c06eea9 100644 (file)
  */
 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_table instead of script=wizard_table.php in your TCA. This
+script will be removed in two versions.');
+/** @var \TYPO3\CMS\Backend\Controller\Wizard\TableController $tableController */
 $tableController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\Wizard\\TableController');
 $tableController->main();
 $tableController->printContent();