3 * This file is part of the TYPO3 CMS project.
5 * It is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License, either version 2
7 * of the License, or any later version.
9 * For the full copyright and license information, please read the
10 * LICENSE.txt file that was distributed with this source code.
12 * The TYPO3 project - inspiring people to share!
16 * Main form rendering script
17 * By sending certain parameters to this script you can bring up a form
18 * which allows the user to edit the content of one or more database records.
20 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
22 require_once 'init.php';
23 \TYPO3\CMS\Backend\Utility\BackendUtility
::lockRecords();
25 /* @var $editDocumentController \TYPO3\CMS\Backend\Controller\EditDocumentController */
26 $editDocumentController = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController');
28 // Preprocessing, storing data if submitted to
29 $editDocumentController->preInit();
31 // Checks, if a save button has been clicked (or the doSave variable is sent)
32 if ($editDocumentController->doProcessData()) {
33 $formprotection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory
::get();
34 if ($formprotection->validateToken(\TYPO3\CMS\Core\Utility\GeneralUtility
::_GP('formToken'), 'editRecord')) {
35 $editDocumentController->processData();
39 $editDocumentController->init();
40 $editDocumentController->main();
41 $editDocumentController->printContent();