[TASK] Move record-related entrypoints to backend routing 09/42609/3
authorManuel Selbach <manuel_selbach@yahoo.de>
Fri, 14 Aug 2015 08:00:21 +0000 (10:00 +0200)
committerBenni Mack <benni@typo3.org>
Mon, 17 Aug 2015 14:48:52 +0000 (16:48 +0200)
Resolves: #69038
Releases: master
Change-Id: I6ad5e541b1741f0b29a1f68d631404cb5a6d38d2
Reviewed-on: http://review.typo3.org/42609
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
24 files changed:
typo3/sysext/backend/Classes/Controller/ContentElement/ElementHistoryController.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/DummyController.php
typo3/sysext/backend/Classes/Controller/LoginFramesetController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Configuration/Backend/Routes.php
typo3/sysext/backend/Modules/Browser/conf.php [deleted file]
typo3/sysext/backend/Modules/Browser/index.php [deleted file]
typo3/sysext/backend/Modules/LoginFrameset/conf.php [deleted file]
typo3/sysext/backend/Modules/LoginFrameset/index.php [deleted file]
typo3/sysext/backend/Modules/MoveElement/conf.php [deleted file]
typo3/sysext/backend/Modules/MoveElement/index.php [deleted file]
typo3/sysext/backend/Modules/NewContentElement/conf.php [deleted file]
typo3/sysext/backend/Modules/NewContentElement/index.php [deleted file]
typo3/sysext/backend/Modules/NewRecord/conf.php [deleted file]
typo3/sysext/backend/Modules/NewRecord/index.php [deleted file]
typo3/sysext/backend/Modules/RecordHistory/conf.php [deleted file]
typo3/sysext/backend/Modules/RecordHistory/index.php [deleted file]
typo3/sysext/backend/Modules/ShowItem/conf.php [deleted file]
typo3/sysext/backend/Modules/ShowItem/index.php [deleted file]
typo3/sysext/backend/ext_tables.php
typo3/sysext/recordlist/Classes/Controller/ElementBrowserFramesetController.php

index b4a1226..fef7289 100644 (file)
@@ -14,13 +14,16 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
  * The TYPO3 project - inspiring people to share!
  */
 
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Script Class for showing the history module of TYPO3s backend
  * @see \TYPO3\CMS\Backend\History\RecordHistory
  */
-class ElementHistoryController {
+class ElementHistoryController implements \TYPO3\CMS\Core\Http\ControllerInterface {
 
        /**
         * @var string
@@ -50,6 +53,25 @@ class ElementHistoryController {
        }
 
        /**
+        * Injects the request object for the current request or subrequest
+        * As this controller goes only through the main() method, it is rather simple for now
+        *
+        * @param ServerRequestInterface $request
+        * @return ResponseInterface $response
+        */
+       public function processRequest(ServerRequestInterface $request) {
+               $this->main();
+
+               $this->content .= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
+
+               /** @var Response $response */
+               $response = GeneralUtility::makeInstance(Response::class);
+               $response->getBody()->write($this->content);
+               return $response;
+       }
+
+       /**
         * Initialize the module output
         *
         * @return void
@@ -85,8 +107,10 @@ class ElementHistoryController {
         * Outputting the accumulated content to screen
         *
         * @return void
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use processRequest() instead
         */
        public function printContent() {
+               GeneralUtility::logDeprecatedFunction();
                $this->content .= $this->doc->endPage();
                $this->content = $this->doc->insertStylesAndJS($this->content);
                echo $this->content;
index 45ac5b5..32ea6e5 100644 (file)
@@ -14,6 +14,9 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
  * The TYPO3 project - inspiring people to share!
  */
 
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Imaging\Icon;
@@ -27,7 +30,7 @@ use TYPO3\CMS\Backend\Backend\Avatar\Avatar;
 /**
  * Script Class for showing information about an item.
  */
-class ElementInformationController {
+class ElementInformationController implements \TYPO3\CMS\Core\Http\ControllerInterface {
 
        /**
         * Record table name
@@ -191,6 +194,26 @@ class ElementInformationController {
        }
 
        /**
+        * Injects the request object for the current request or subrequest
+        * As this controller goes only through the main() method, it is rather simple for now
+        *
+        * @param ServerRequestInterface $request
+        * @return ResponseInterface $response
+        */
+       public function processRequest(ServerRequestInterface $request) {
+               $this->main();
+
+               $content = $this->doc->startPage($this->titleTag);
+               $content .= $this->doc->insertStylesAndJS($this->content);
+               $content .= $this->doc->endPage();
+
+               /** @var Response $response */
+               $response = GeneralUtility::makeInstance(Response::class);
+               $response->getBody()->write($content);
+               return $response;
+       }
+
+       /**
         * @return void
         */
        public function main() {
@@ -520,8 +543,10 @@ class ElementInformationController {
         * End page and print content
         *
         * @return void
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use processRequest() instead
         */
        public function printContent() {
+               GeneralUtility::logDeprecatedFunction();
                echo $this->doc->startPage($this->titleTag) .
                        $this->doc->insertStylesAndJS($this->content) .
                        $this->doc->endPage();
index 16bce2d..c95530e 100644 (file)
@@ -14,6 +14,9 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
  * The TYPO3 project - inspiring people to share!
  */
 
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -21,7 +24,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 /**
  * Script Class for rendering the move-element wizard display
  */
-class MoveElementController {
+class MoveElementController implements \TYPO3\CMS\Core\Http\ControllerInterface {
 
        /**
         * @var int
@@ -114,6 +117,22 @@ class MoveElementController {
        }
 
        /**
+        * Injects the request object for the current request or subrequest
+        * As this controller goes only through the main() method, it is rather simple for now
+        *
+        * @param ServerRequestInterface $request
+        * @return ResponseInterface $response
+        */
+       public function processRequest(ServerRequestInterface $request) {
+               $this->main();
+
+               /** @var Response $response */
+               $response = GeneralUtility::makeInstance(Response::class);
+               $response->getBody()->write($this->content);
+               return $response;
+       }
+
+       /**
         * Creating the module output.
         *
         * @return void
@@ -228,8 +247,10 @@ class MoveElementController {
         * Print out the accumulated content:
         *
         * @return void
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use processRequest() instead
         */
        public function printContent() {
+               GeneralUtility::logDeprecatedFunction();
                echo $this->content;
        }
 
index 8edcfdd..011dd95 100644 (file)
@@ -14,6 +14,9 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
  * The TYPO3 project - inspiring people to share!
  */
 
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -22,7 +25,7 @@ use TYPO3\CMS\Core\Utility\PathUtility;
 /**
  * Script Class for the New Content element wizard
  */
-class NewContentElementController {
+class NewContentElementController implements \TYPO3\CMS\Core\Http\ControllerInterface {
 
        /**
         * Page id
@@ -118,6 +121,14 @@ class NewContentElementController {
        protected $MCONF;
 
        /**
+        * Constructor
+        */
+       public function __construct() {
+               $GLOBALS['SOBE'] = $this;
+               $this->init();
+       }
+
+       /**
         * Constructor, initializing internal variables.
         *
         * @return void
@@ -154,6 +165,22 @@ class NewContentElementController {
        }
 
        /**
+        * Injects the request object for the current request or subrequest
+        * As this controller goes only through the main() method, it is rather simple for now
+        *
+        * @param ServerRequestInterface $request
+        * @return ResponseInterface $response
+        */
+       public function processRequest(ServerRequestInterface $request) {
+               $this->main();
+
+               /** @var Response $response */
+               $response = GeneralUtility::makeInstance(Response::class);
+               $response->getBody()->write($this->content);
+               return $response;
+       }
+
+       /**
         * Creating the module output.
         *
         * @return void
@@ -312,8 +339,10 @@ class NewContentElementController {
         * Print out the accumulated content:
         *
         * @return void
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use processRequest() instead
         */
        public function printContent() {
+               GeneralUtility::logDeprecatedFunction();
                echo $this->content;
        }
 
index 1be5e83..dd59e15 100644 (file)
@@ -14,10 +14,15 @@ namespace TYPO3\CMS\Backend\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use TYPO3\CMS\Core\Http\Response;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class, creating the content for the dummy script - which is just blank output.
  */
-class DummyController {
+class DummyController implements \TYPO3\CMS\Core\Http\ControllerInterface {
 
        /**
         * @var string
@@ -25,6 +30,29 @@ class DummyController {
        public $content;
 
        /**
+        * Constructor
+        */
+       public function __construct() {
+               $GLOBALS['SOBE'] = $this;
+       }
+
+       /**
+        * Injects the request object for the current request or subrequest
+        * As this controller goes only through the main() method, it is rather simple for now
+        *
+        * @param ServerRequestInterface $request
+        * @return ResponseInterface $response
+        */
+       public function processRequest(ServerRequestInterface $request) {
+               $this->main();
+
+               /** @var Response $response */
+               $response = GeneralUtility::makeInstance(Response::class);
+               $response->getBody()->write($this->content);
+               return $response;
+       }
+
+       /**
         * Create content for the dummy script - outputting a blank page.
         *
         * @return void
@@ -40,8 +68,10 @@ class DummyController {
         * Outputting the accumulated content to screen
         *
         * @return void
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use processRequest() instead
         */
        public function printContent() {
+               GeneralUtility::logDeprecatedFunction();
                echo $this->content;
        }
 
index 0934691..817196e 100644 (file)
@@ -14,6 +14,9 @@ namespace TYPO3\CMS\Backend\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -21,7 +24,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 /**
  * Script Class, putting the frameset together.
  */
-class LoginFramesetController {
+class LoginFramesetController implements \TYPO3\CMS\Core\Http\ControllerInterface {
 
        /**
         * @var string
@@ -29,6 +32,29 @@ class LoginFramesetController {
        protected $content;
 
        /**
+        * Constructor
+        */
+       public function __construct() {
+               $GLOBALS['SOBE'] = $this;
+       }
+
+       /**
+        * Injects the request object for the current request or subrequest
+        * As this controller goes only through the main() method, it is rather simple for now
+        *
+        * @param ServerRequestInterface $request
+        * @return ResponseInterface $response
+        */
+       public function processRequest(ServerRequestInterface $request) {
+               $this->main();
+
+               /** @var Response $response */
+               $response = GeneralUtility::makeInstance(Response::class);
+               $response->getBody()->write($this->content);
+               return $response;
+       }
+
+       /**
         * Main function.
         * Creates the header code and the frameset for the two frames.
         *
@@ -51,8 +77,10 @@ class LoginFramesetController {
         * Outputs the page content.
         *
         * @return void
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use processRequest() instead
         */
        public function printContent() {
+               GeneralUtility::logDeprecatedFunction();
                echo $this->content;
        }
 
index 6563180..d0a49bf 100644 (file)
@@ -14,6 +14,9 @@ namespace TYPO3\CMS\Backend\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Database\DatabaseConnection;
@@ -31,7 +34,7 @@ use TYPO3\CMS\Frontend\Page\PageRepository;
 /**
  * Script class for 'db_new'
  */
-class NewRecordController {
+class NewRecordController implements \TYPO3\CMS\Core\Http\ControllerInterface {
 
        /**
         * @var array
@@ -227,6 +230,22 @@ class NewRecordController {
        }
 
        /**
+        * Injects the request object for the current request or subrequest
+        * As this controller goes only through the main() method, it is rather simple for now
+        *
+        * @param ServerRequestInterface $request
+        * @return ResponseInterface $response
+        */
+       public function processRequest(ServerRequestInterface $request) {
+               $this->main();
+
+               /** @var Response $response */
+               $response = GeneralUtility::makeInstance(Response::class);
+               $response->getBody()->write($this->content);
+               return $response;
+       }
+
+       /**
         * Main processing, creating the list of new record tables to select from
         *
         * @return void
@@ -552,8 +571,10 @@ class NewRecordController {
         * Ending page output and echo'ing content to browser.
         *
         * @return void
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use processRequest() instead
         */
        public function printContent() {
+               GeneralUtility::logDeprecatedFunction();
                echo $this->content;
        }
 
index 6aa6607..5b933ab 100644 (file)
@@ -105,4 +105,53 @@ return [
                'path' => '/file/upload',
                'controller' => \TYPO3\CMS\Backend\Controller\File\FileUploadController::class
        ],
-];
\ No newline at end of file
+
+       // Register login frameset
+       'login_frameset' => [
+               'path' => '/login/frame',
+               'controller' => \TYPO3\CMS\Backend\Controller\LoginFramesetController::class
+       ],
+
+       // Register record history module
+       'record_history' => [
+               'path' => '/record/history',
+               'controller' => \TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::class
+       ],
+
+       // Register new record
+       'db_new' => [
+               'path' => '/record/new',
+               'controller' => \TYPO3\CMS\Backend\Controller\NewRecordController::class
+       ],
+
+       // Register new content element module
+       'new_content_element' => [
+               'path' => '/record/content/new',
+               'controller' => \TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::class
+       ],
+
+       // Register move element module
+       'move_element' => [
+               'path' => '/record/move',
+               'controller' => \TYPO3\CMS\Backend\Controller\ContentElement\MoveElementController::class
+       ],
+
+       // Register show item module
+       'show_item' => [
+               'path' => '/record/info',
+               'controller' => \TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController::class
+       ],
+
+       // Register browser
+       'browser' => [
+               'path' => '/record/browse',
+               'controller' => \TYPO3\CMS\Recordlist\Controller\ElementBrowserFramesetController::class
+       ],
+
+       // Register dummy window
+       'dummy' => [
+               'path' => '/empty',
+               'controller' => \TYPO3\CMS\Backend\Controller\DummyController::class
+       ],
+
+];
diff --git a/typo3/sysext/backend/Modules/Browser/conf.php b/typo3/sysext/backend/Modules/Browser/conf.php
deleted file mode 100644 (file)
index fd9f925..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-$MCONF['name'] = 'browser';
-$MCONF['script'] = '_DISPATCH';
\ No newline at end of file
diff --git a/typo3/sysext/backend/Modules/Browser/index.php b/typo3/sysext/backend/Modules/Browser/index.php
deleted file mode 100644 (file)
index 28dfa9b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * This is the frameset to the file/record browser window
- */
-
-$elementBrowserFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-       \TYPO3\CMS\Recordlist\Controller\ElementBrowserFramesetController::class
-);
-$elementBrowserFramesetController->main();
-$elementBrowserFramesetController->printContent();
diff --git a/typo3/sysext/backend/Modules/LoginFrameset/conf.php b/typo3/sysext/backend/Modules/LoginFrameset/conf.php
deleted file mode 100644 (file)
index cbb709a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-$MCONF['script'] = '_DISPATCH';
-$MCONF['name'] = 'login_frameset';
\ No newline at end of file
diff --git a/typo3/sysext/backend/Modules/LoginFrameset/index.php b/typo3/sysext/backend/Modules/LoginFrameset/index.php
deleted file mode 100644 (file)
index 6d1ea84..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Login frameset
- *
- * This script generates a login-frameset used when the user must relogin.
- */
-define('TYPO3_PROCEED_IF_NO_USER', 1);
-
-$loginFramesetController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\LoginFramesetController::class);
-$loginFramesetController->main();
-$loginFramesetController->printContent();
diff --git a/typo3/sysext/backend/Modules/MoveElement/conf.php b/typo3/sysext/backend/Modules/MoveElement/conf.php
deleted file mode 100644 (file)
index 069787f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-$MCONF['script'] = '_DISPATCH';
-$MCONF['name'] = 'move_element';
\ No newline at end of file
diff --git a/typo3/sysext/backend/Modules/MoveElement/index.php b/typo3/sysext/backend/Modules/MoveElement/index.php
deleted file mode 100644 (file)
index e4c31e7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Moving pages or content elements (tt_content) around in the system via a page tree navigation.
- */
-$moveElementController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\ContentElement\MoveElementController::class);
-$moveElementController->main();
-$moveElementController->printContent();
diff --git a/typo3/sysext/backend/Modules/NewContentElement/conf.php b/typo3/sysext/backend/Modules/NewContentElement/conf.php
deleted file mode 100644 (file)
index e7a83fa..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-$MCONF['script'] = '_DISPATCH';
-$MCONF['name'] = 'new_content_element';
\ No newline at end of file
diff --git a/typo3/sysext/backend/Modules/NewContentElement/index.php b/typo3/sysext/backend/Modules/NewContentElement/index.php
deleted file mode 100644 (file)
index 3c0f459..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-$GLOBALS['SOBE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController::class);
-$GLOBALS['SOBE']->init();
-$GLOBALS['SOBE']->main();
-$GLOBALS['SOBE']->printContent();
diff --git a/typo3/sysext/backend/Modules/NewRecord/conf.php b/typo3/sysext/backend/Modules/NewRecord/conf.php
deleted file mode 100644 (file)
index 17b22fd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-$MCONF['script'] = '_DISPATCH';
-$MCONF['name'] = 'db_new';
\ No newline at end of file
diff --git a/typo3/sysext/backend/Modules/NewRecord/index.php b/typo3/sysext/backend/Modules/NewRecord/index.php
deleted file mode 100644 (file)
index cb97d66..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * New database item menu
- *
- * This script lets users choose a new database element to create.
- * Includes a wizard mode for visually pointing out the position of new pages
- */
-
-$newRecordController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\NewRecordController::class);
-$newRecordController->main();
-$newRecordController->printContent();
diff --git a/typo3/sysext/backend/Modules/RecordHistory/conf.php b/typo3/sysext/backend/Modules/RecordHistory/conf.php
deleted file mode 100644 (file)
index 30d3083..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-$MCONF['name'] = 'record_history';
-$MCONF['script'] = '_DISPATCH';
-$MCONF['access'] = '';
\ No newline at end of file
diff --git a/typo3/sysext/backend/Modules/RecordHistory/index.php b/typo3/sysext/backend/Modules/RecordHistory/index.php
deleted file mode 100644 (file)
index dda2c22..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-$elementHistoryController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController::class);
-$elementHistoryController->main();
-$elementHistoryController->printContent();
\ No newline at end of file
diff --git a/typo3/sysext/backend/Modules/ShowItem/conf.php b/typo3/sysext/backend/Modules/ShowItem/conf.php
deleted file mode 100644 (file)
index 097fc1d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-$MCONF['name'] = 'show_item';
-$MCONF['script'] = '_DISPATCH';
\ No newline at end of file
diff --git a/typo3/sysext/backend/Modules/ShowItem/index.php b/typo3/sysext/backend/Modules/ShowItem/index.php
deleted file mode 100644 (file)
index 9df789e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-$elementInformationController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-       \TYPO3\CMS\Backend\Controller\ContentElement\ElementInformationController::class
-);
-$elementInformationController->main();
-$elementInformationController->printContent();
\ No newline at end of file
index 4ad12b9..f82ca04 100644 (file)
@@ -9,18 +9,6 @@ if (TYPO3_MODE === 'BE') {
                'EXT:backend/Modules/FormEngine/'
        );
 
-       // Register record history module
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
-               'record_history',
-               'EXT:backend/Modules/RecordHistory/'
-       );
-
-       // Register login frameset
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
-               'login_frameset',
-               'EXT:backend/Modules/LoginFrameset/'
-       );
-
        // Register file_navframe
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addCoreNavigationComponent('file', 'file_navframe');
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
@@ -58,42 +46,6 @@ if (TYPO3_MODE === 'BE') {
                )
        );
 
-       // Register new record
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
-               'db_new',
-               'EXT:backend/Modules/NewRecord/'
-       );
-
-       // Register new content element module
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
-               'new_content_element',
-               'EXT:backend/Modules/NewContentElement/'
-       );
-
-       // Register move element module
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
-               'move_element',
-               'EXT:backend/Modules/MoveElement/'
-       );
-
-       // Register show item module
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
-               'show_item',
-               'EXT:backend/Modules/ShowItem/'
-       );
-
-       // Register browser
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
-               'browser',
-               'EXT:backend/Modules/Browser/'
-       );
-
-       // Register dummy window
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
-               'dummy',
-               'EXT:backend/Modules/Dummy/'
-       );
-
        // Register BackendLayoutDataProvider for PageTs
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['BackendLayoutDataProvider']['pagets'] = \TYPO3\CMS\Backend\Provider\PageTsBackendLayoutDataProvider::class;
 }
index 9ddd8eb..3ed134e 100644 (file)
@@ -14,6 +14,9 @@ namespace TYPO3\CMS\Recordlist\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use Psr\Http\Message\ServerRequestInterface;
+use Psr\Http\Message\ResponseInterface;
+use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Backend\Template\DocumentTemplate;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Page\PageRenderer;
@@ -23,7 +26,7 @@ use TYPO3\CMS\Lang\LanguageService;
 /**
  * Script Class, putting the frameset together.
  */
-class ElementBrowserFramesetController {
+class ElementBrowserFramesetController implements \TYPO3\CMS\Core\Http\ControllerInterface {
 
        /**
         * Internal, dynamic
@@ -38,6 +41,29 @@ class ElementBrowserFramesetController {
        protected $pageRenderer = NULL;
 
        /**
+        * Constructor
+        */
+       public function __construct() {
+               $GLOBALS['SOBE'] = $this;
+       }
+
+       /**
+        * Injects the request object for the current request or subrequest
+        * As this controller goes only through the main() method, it is rather simple for now
+        *
+        * @param ServerRequestInterface $request
+        * @return ResponseInterface $response
+        */
+       public function processRequest(ServerRequestInterface $request) {
+               $this->main();
+
+               /** @var Response $response */
+               $response = GeneralUtility::makeInstance(Response::class);
+               $response->getBody()->write($this->content);
+               return $response;
+       }
+
+       /**
         * Main function.
         * Creates the header code in XHTML, the JavaScript, then the frameset for the two frames.
         *
@@ -83,8 +109,10 @@ class ElementBrowserFramesetController {
         * Outputs the page content.
         *
         * @return void
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use processRequest() instead
         */
        public function printContent() {
+               GeneralUtility::logDeprecatedFunction();
                echo $this->content;
        }