[FEATURE] Extract admin panel to own extension 30/56030/6
authorSusanne Moog <susanne.moog@typo3.org>
Wed, 7 Mar 2018 10:58:26 +0000 (11:58 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Wed, 7 Mar 2018 19:54:58 +0000 (20:54 +0100)
Extract all admin panel code to an own extension to
reduce cross-dependencies and allow clearer scoping.

See Epic / Initiative for background.

Related: #84044
Resolves: #84159
Releases: master
Change-Id: I0f6e2643746c94f0e10b87146ca7e86cbf8bc112
Reviewed-on: https://review.typo3.org/56030
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
43 files changed:
Build/Gruntfile.js
composer.json
composer.lock
typo3/sysext/adminpanel/Classes/Modules/AbstractModule.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/Modules/AdminPanelModuleInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/Modules/CacheModule.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/Modules/EditModule.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/Modules/InfoModule.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/View/AdminPanelView.php [new file with mode: 0644]
typo3/sysext/adminpanel/Classes/View/AdminPanelViewHookInterface.php [new file with mode: 0644]
typo3/sysext/adminpanel/LICENSE.txt [new file with mode: 0644]
typo3/sysext/adminpanel/Migrations/Code/ClassAliasMap.php [new file with mode: 0644]
typo3/sysext/adminpanel/Migrations/Code/LegacyClassesForIde.php [new file with mode: 0644]
typo3/sysext/adminpanel/Resources/Public/Css/adminpanel.css [new file with mode: 0644]
typo3/sysext/adminpanel/Resources/Public/Icons/Extension.png [new file with mode: 0644]
typo3/sysext/adminpanel/Resources/Public/Icons/module-adminpanel.svg [new file with mode: 0644]
typo3/sysext/adminpanel/Tests/Unit/View/AdminPanelViewTest.php [new file with mode: 0644]
typo3/sysext/adminpanel/Tests/Unit/View/Fixtures/AdminPanelDisabledModuleFixture.php [new file with mode: 0644]
typo3/sysext/adminpanel/Tests/Unit/View/Fixtures/AdminPanelEnabledShownOnSubmitInitializeModuleFixture.php [new file with mode: 0644]
typo3/sysext/adminpanel/composer.json [new file with mode: 0644]
typo3/sysext/adminpanel/ext_emconf.php [new file with mode: 0644]
typo3/sysext/adminpanel/ext_localconf.php [new file with mode: 0644]
typo3/sysext/backend/Classes/FrontendBackendUserAuthentication.php
typo3/sysext/core/Classes/FrontendEditing/FrontendEditingController.php
typo3/sysext/core/Documentation/Changelog/master/Feature-84045-NewAdminPanelModuleAPI.rst
typo3/sysext/core/Documentation/Changelog/master/Feature-84159-ExtractAdminPanelToOwnExtension.rst [new file with mode: 0644]
typo3/sysext/feedit/Classes/FrontendEditPanel.php
typo3/sysext/frontend/Classes/AdminPanel/AbstractModule.php [deleted file]
typo3/sysext/frontend/Classes/AdminPanel/AdminPanelModuleInterface.php [deleted file]
typo3/sysext/frontend/Classes/AdminPanel/CacheModule.php [deleted file]
typo3/sysext/frontend/Classes/AdminPanel/EditModule.php [deleted file]
typo3/sysext/frontend/Classes/AdminPanel/InfoModule.php [deleted file]
typo3/sysext/frontend/Classes/AdminPanel/PreviewModule.php [deleted file]
typo3/sysext/frontend/Classes/AdminPanel/TsDebugModule.php [deleted file]
typo3/sysext/frontend/Classes/View/AdminPanelView.php [deleted file]
typo3/sysext/frontend/Classes/View/AdminPanelViewHookInterface.php [deleted file]
typo3/sysext/frontend/Resources/Public/Css/adminpanel.css [deleted file]
typo3/sysext/frontend/Tests/Unit/View/AdminPanelViewTest.php [deleted file]
typo3/sysext/frontend/Tests/Unit/View/Fixtures/AdminPanelDisabledModuleFixture.php [deleted file]
typo3/sysext/frontend/Tests/Unit/View/Fixtures/AdminPanelEnabledShownOnSubmitInitializeModuleFixture.php [deleted file]
typo3/sysext/frontend/ext_localconf.php

index dbe8d78..42bef67 100644 (file)
@@ -52,6 +52,7 @@ module.exports = function (grunt) {
       sysext: '<%= paths.root %>typo3/sysext/',
       form: '<%= paths.sysext %>form/Resources/',
       frontend: '<%= paths.sysext %>frontend/Resources/',
+      adminpanel: '<%= paths.sysext %>adminpanel/Resources/',
       install: '<%= paths.sysext %>install/Resources/',
       linkvalidator: '<%= paths.sysext %>linkvalidator/Resources/',
       backend: '<%= paths.sysext %>backend/Resources/',
@@ -104,9 +105,9 @@ module.exports = function (grunt) {
           "<%= paths.form %>Public/Css/form.css": "<%= paths.sass %>form.scss"
         }
       },
-      frontend: {
+      adminpanel: {
         files: {
-          "<%= paths.frontend %>Public/Css/adminpanel.css": "<%= paths.sass %>adminpanel.scss"
+          "<%= paths.adminpanel %>Public/Css/adminpanel.css": "<%= paths.sass %>adminpanel.scss"
         }
       },
       install: {
@@ -170,6 +171,9 @@ module.exports = function (grunt) {
           })
         ]
       },
+      adminpanel: {
+        src: '<%= paths.adminpanel %>Public/Css/*.css'
+      },
       backend: {
         src: '<%= paths.backend %>Public/Css/*.css'
       },
@@ -273,6 +277,10 @@ module.exports = function (grunt) {
             src: '<%= paths.t3icons %>module/module-about.svg'
           },
           {
+            dest: '<%= paths.sysext %>about/Resources/Public/Icons/module-adminpanel.svg',
+            src: '<%= paths.t3icons %>module/module-adminpanel.svg'
+          },
+          {
             dest: '<%= paths.sysext %>belog/Resources/Public/Icons/module-belog.svg',
             src: '<%= paths.t3icons %>module/module-belog.svg'
           },
index 16ca07b..58efd20 100644 (file)
@@ -77,6 +77,7 @@
                "typo3/class-alias-loader": {
                        "always-add-alias-loader": true,
                        "class-alias-maps": [
+                               "typo3/sysext/adminpanel/Migrations/Code/ClassAliasMap.php",
                                "typo3/sysext/backend/Migrations/Code/ClassAliasMap.php",
                                "typo3/sysext/core/Migrations/Code/ClassAliasMap.php",
                                "typo3/sysext/documentation/Migrations/Code/ClassAliasMap.php",
@@ -98,6 +99,7 @@
        ],
        "replace": {
                "typo3/cms-about": "self.version",
+               "typo3/cms-adminpanel": "self.version",
                "typo3/cms-backend": "self.version",
                "typo3/cms-belog": "self.version",
                "typo3/cms-beuser": "self.version",
        "autoload": {
                "psr-4": {
                        "TYPO3\\CMS\\About\\": "typo3/sysext/about/Classes/",
+                       "TYPO3\\CMS\\Adminpanel\\": "typo3/sysext/adminpanel/Classes/",
                        "TYPO3\\CMS\\Backend\\": "typo3/sysext/backend/Classes/",
                        "TYPO3\\CMS\\Belog\\": "typo3/sysext/belog/Classes/",
                        "TYPO3\\CMS\\Beuser\\": "typo3/sysext/beuser/Classes/",
        },
        "autoload-dev": {
                "psr-4": {
+                       "TYPO3\\CMS\\Adminpanel\\Tests\\": "typo3/sysext/adminpanel/Tests/",
                        "TYPO3\\CMS\\Backend\\Tests\\": "typo3/sysext/backend/Tests/",
                        "TYPO3\\CMS\\Belog\\Tests\\": "typo3/sysext/belog/Tests/",
                        "TYPO3\\CMS\\Beuser\\Tests\\": "typo3/sysext/beuser/Tests/",
index cb47d55..795a96b 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "2bd96e5071eb99b24b31261e2e03e4aa",
+    "content-hash": "7a5e50e93405a4bc5c093fa6904bf5b2",
     "packages": [
         {
             "name": "cogpowered/finediff",
diff --git a/typo3/sysext/adminpanel/Classes/Modules/AbstractModule.php b/typo3/sysext/adminpanel/Classes/Modules/AbstractModule.php
new file mode 100644 (file)
index 0000000..f248961
--- /dev/null
@@ -0,0 +1,177 @@
+<?php
+declare(strict_types=1);
+
+namespace TYPO3\CMS\Adminpanel\Modules;
+
+/*
+ * 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!
+ */
+
+use TYPO3\CMS\Backend\FrontendBackendUserAuthentication;
+use TYPO3\CMS\Core\Localization\LanguageService;
+
+/**
+ * Abstract base class for Core Admin Panel Modules containing helper methods
+ *
+ * @internal
+ */
+abstract class AbstractModule implements AdminPanelModuleInterface
+{
+
+    /**
+     * @inheritdoc
+     */
+    public function getAdditionalJavaScriptCode(): string
+    {
+        return '';
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function initializeModule(): void
+    {
+    }
+
+    /**
+     * Returns true if the module is
+     * -> either enabled via tsconfig admPanel.enable
+     * -> or any setting is overridden
+     * override is a way to use functionality of the admin panel without displaying the admin panel to users
+     * for example: hidden records or pages can be displayed by default
+     *
+     * @return bool
+     */
+    public function isEnabled(): bool
+    {
+        $identifier = $this->getIdentifier();
+        $result = $this->isEnabledViaTsConfig();
+        if ($this->getBackendUser()->extAdminConfig['override.'][$identifier] ?? false) {
+            $result = (bool)$this->getBackendUser()->extAdminConfig['override.'][$identifier];
+        }
+        return $result;
+    }
+
+    /**
+     * Uses the backend user session to determine if the module is open
+     *
+     * @return bool
+     */
+    public function isOpen(): bool
+    {
+        $option = 'display_' . $this->getIdentifier();
+        return isset($this->getBackendUser()->uc['TSFE_adminConfig'][$option])
+            ? (bool)$this->getBackendUser()->uc['TSFE_adminConfig'][$option]
+            : false;
+    }
+
+    /**
+     * Determines if the panel for this module is shown
+     * -> returns true if panel is enabled in TSConfig
+     *
+     * @see isEnabled()
+     * @return bool
+     */
+    public function isShown(): bool
+    {
+        return $this->isEnabledViaTsConfig();
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function onSubmit(array $input): void
+    {
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function showFormSubmitButton(): bool
+    {
+        return false;
+    }
+
+    /**
+     * Translate given key
+     *
+     * @param string $key Key for a label in the $LOCAL_LANG array of "sysext/lang/Resources/Private/Language/locallang_tsfe.xlf
+     * @param bool $convertWithHtmlspecialchars If TRUE the language-label will be sent through htmlspecialchars
+     * @return string The value for the $key
+     */
+    protected function extGetLL($key, $convertWithHtmlspecialchars = true): string
+    {
+        $labelStr = $this->getLanguageService()->getLL($key);
+        if ($convertWithHtmlspecialchars) {
+            $labelStr = htmlspecialchars($labelStr);
+        }
+        return $labelStr;
+    }
+
+    /**
+     * Returns the current BE user.
+     *
+     * @return \TYPO3\CMS\Backend\FrontendBackendUserAuthentication
+     */
+    protected function getBackendUser(): FrontendBackendUserAuthentication
+    {
+        return $GLOBALS['BE_USER'];
+    }
+
+    /**
+     * Helper method to return configuration options
+     * Checks User TSConfig overrides and current backend user session
+     *
+     * @param string $option
+     * @return string
+     */
+    protected function getConfigurationOption(string $option): string
+    {
+        $beUser = $this->getBackendUser();
+        $identifier = $this->getIdentifier();
+
+        if ($option && isset($beUser->extAdminConfig['override.'][$identifier . '.'][$option])) {
+            $returnValue = $beUser->extAdminConfig['override.'][$identifier . '.'][$option];
+        } else {
+            $returnValue = $beUser->uc['TSFE_adminConfig'][$identifier . '_' . $option] ?? '';
+        }
+
+        return (string)$returnValue;
+    }
+
+    /**
+     * Returns LanguageService
+     *
+     * @return \TYPO3\CMS\Core\Localization\LanguageService
+     */
+    protected function getLanguageService(): LanguageService
+    {
+        return $GLOBALS['LANG'];
+    }
+
+    /**
+     * Returns true if TSConfig admPanel.enable is set for this module (or all modules)
+     *
+     * @return bool
+     */
+    protected function isEnabledViaTsConfig(): bool
+    {
+        $result = false;
+        $identifier = $this->getIdentifier();
+        if (!empty($this->getBackendUser()->extAdminConfig['enable.']['all'])) {
+            $result = true;
+        } elseif (!empty($this->getBackendUser()->extAdminConfig['enable.'][$identifier])) {
+            $result = true;
+        }
+        return $result;
+    }
+}
diff --git a/typo3/sysext/adminpanel/Classes/Modules/AdminPanelModuleInterface.php b/typo3/sysext/adminpanel/Classes/Modules/AdminPanelModuleInterface.php
new file mode 100644 (file)
index 0000000..ec71e9e
--- /dev/null
@@ -0,0 +1,106 @@
+<?php
+declare(strict_types=1);
+
+namespace TYPO3\CMS\Adminpanel\Modules;
+
+/*
+ * 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!
+ */
+
+/**
+ * Interface for admin panel modules registered via EXTCONF
+ *
+ * @internal until API is stable
+ */
+interface AdminPanelModuleInterface
+{
+    /**
+     * Additional JavaScript code for this module
+     * (you should only use vanilla JS here, as you cannot
+     * rely on the web site providing a specific framework)
+     *
+     * @return string
+     */
+    public function getAdditionalJavaScriptCode(): string;
+
+    /**
+     * Module content as rendered HTML
+     *
+     * @return string
+     */
+    public function getContent(): string;
+
+    /**
+     * Identifier for this module,
+     * for example "preview" or "cache"
+     *
+     * @return string
+     */
+    public function getIdentifier(): string;
+
+    /**
+     * Module label
+     *
+     * @return string
+     */
+    public function getLabel(): string;
+
+    /**
+     * Initialize the module - runs early in a TYPO3 request
+     */
+    public function initializeModule(): void;
+
+    /**
+     * Module is enabled
+     * -> should be initialized
+     * A module may be enabled but not shown
+     * -> only the initializeModule() method
+     * will be called
+     *
+     * @return bool
+     */
+    public function isEnabled(): bool;
+
+    /**
+     * Module is open
+     * -> module is enabled
+     * -> module panel is shown and open
+     *
+     * @return bool
+     */
+    public function isOpen(): bool;
+
+    /**
+     * Module is shown
+     * -> module is enabled
+     * -> module panel should be displayed
+     *
+     * @return bool
+     */
+    public function isShown(): bool;
+
+    /**
+     * Executed on saving / submit of the configuration form
+     * Can be used to react to changed settings
+     * (for example: clearing a specific cache)
+     *
+     * @param array $input
+     */
+    public function onSubmit(array $input): void;
+
+    /**
+     * Does this module need a form submit?
+     *
+     * @return bool
+     */
+    public function showFormSubmitButton(): bool;
+}
diff --git a/typo3/sysext/adminpanel/Classes/Modules/CacheModule.php b/typo3/sysext/adminpanel/Classes/Modules/CacheModule.php
new file mode 100644 (file)
index 0000000..d419e61
--- /dev/null
@@ -0,0 +1,144 @@
+<?php
+declare(strict_types=1);
+
+namespace TYPO3\CMS\Adminpanel\Modules;
+
+/*
+ * 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!
+ */
+
+use TYPO3\CMS\Core\Type\Bitmask\Permission;
+use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+
+class CacheModule extends AbstractModule
+{
+
+    /**
+     * Creates the content for the "cache" section ("module") of the Admin Panel
+     *
+     * @return string HTML content for the section. Consists of a string with table-rows with four columns.
+     */
+    public function getContent(): string
+    {
+        $output = [];
+        if ($this->getBackendUser()->uc['TSFE_adminConfig']['display_cache']) {
+            $output[] = '<div class="typo3-adminPanel-form-group">';
+            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[cache_noCache]" value="0" />';
+            $output[] = '    <label for="cache_noCache">';
+            $output[] = '      <input type="checkbox" id="cache_noCache" name="TSFE_ADMIN_PANEL[cache_noCache]" value="1"' .
+                        ($this->getBackendUser()->uc['TSFE_adminConfig']['cache_noCache'] ? ' checked="checked"' : '') .
+                        ' />';
+            $output[] = '      ' . $this->extGetLL('cache_noCache');
+            $output[] = '    </label>';
+            $output[] = '  </div>';
+            $output[] = '</div>';
+
+            $levels = $this->getBackendUser()->uc['TSFE_adminConfig']['cache_clearCacheLevels'];
+            $output[] = '<div class="typo3-adminPanel-form-group">';
+            $output[] = '  <label for="cache_clearCacheLevels">';
+            $output[] = '    ' . $this->extGetLL('cache_clearLevels');
+            $output[] = '  </label>';
+            $output[] = '  <select id="cache_clearCacheLevels" name="TSFE_ADMIN_PANEL[cache_clearCacheLevels]">';
+            $output[] = '    <option value="0"' . ((int)$levels === 0 ? ' selected="selected"' : '') . '>';
+            $output[] = '      ' . $this->extGetLL('div_Levels_0');
+            $output[] = '    </option>';
+            $output[] = '    <option value="1"' . ($levels == 1 ? ' selected="selected"' : '') . '>';
+            $output[] = '      ' . $this->extGetLL('div_Levels_1');
+            $output[] = '    </option>';
+            $output[] = '    <option value="2"' . ($levels == 2 ? ' selected="selected"' : '') . '>';
+            $output[] = '      ' . $this->extGetLL('div_Levels_2');
+            $output[] = '    </option>';
+            $output[] = '  </select>';
+            $output[] = '</div>';
+
+            $output[] = '<div class="typo3-adminPanel-form-group">';
+            $output[] = '  <input type="hidden" name="TSFE_ADMIN_PANEL[cache_clearCacheId]" value="' .
+                        $GLOBALS['TSFE']->id .
+                        '" />';
+            $output[] = '  <input class="typo3-adminPanel-btn typo3-adminPanel-btn-default" type="submit" value="' .
+                        $this->extGetLL('update') .
+                        '" />';
+            $output[] = '</div>';
+            $output[] = '<div class="typo3-adminPanel-form-group">';
+            $output[] = '  <input class="typo3-adminPanel-btn typo3-adminPanel-btn-default" type="submit" name="TSFE_ADMIN_PANEL[action][clearCache]" value="' .
+                        $this->extGetLL('cache_doit') .
+                        '" />';
+            $output[] = '</div>';
+        }
+        return implode('', $output);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getIdentifier(): string
+    {
+        return 'cache';
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getLabel(): string
+    {
+        return $this->extGetLL('cache');
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function initializeModule(): void
+    {
+        if ($this->getConfigurationOption('noCache')) {
+            $this->getTypoScriptFrontendController()->set_no_cache('Admin Panel: No Caching', true);
+        }
+    }
+
+    /**
+     * Clear cache on saving if requested
+     *
+     * @param array $input
+     */
+    public function onSubmit(array $input): void
+    {
+        if (($input['action']['clearCache'] ?? false) ||
+            isset($input['preview_showFluidDebug'])) {
+            $theStartId = (int)$input['cache_clearCacheId'];
+            $this->getTypoScriptFrontendController()
+                ->clearPageCacheContent_pidList(
+                    $this->getBackendUser()->extGetTreeList(
+                        $theStartId,
+                        (int)$this->getConfigurationOption('clearCacheLevels'),
+                        0,
+                        $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW)
+                    ) . $theStartId
+                );
+        }
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function showFormSubmitButton(): bool
+    {
+        return true;
+    }
+
+    /**
+     * @return TypoScriptFrontendController
+     */
+    protected function getTypoScriptFrontendController(): TypoScriptFrontendController
+    {
+        return $GLOBALS['TSFE'];
+    }
+}
diff --git a/typo3/sysext/adminpanel/Classes/Modules/EditModule.php b/typo3/sysext/adminpanel/Classes/Modules/EditModule.php
new file mode 100644 (file)
index 0000000..aaa153b
--- /dev/null
@@ -0,0 +1,158 @@
+<?php
+declare(strict_types=1);
+
+namespace TYPO3\CMS\Adminpanel\Modules;
+
+/*
+ * 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!
+ */
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+
+/**
+ * Admin Panel Edit Module
+ */
+class EditModule extends AbstractModule
+{
+    /**
+     * Creates the content for the "edit" section ("module") of the Admin Panel
+     *
+     * @return string HTML content for the section. Consists of a string with table-rows with four columns.
+     */
+    public function getContent(): string
+    {
+        $output = [];
+        if ($this->getBackendUser()->uc['TSFE_adminConfig']['display_edit']) {
+
+            // If another page module was specified, replace the default Page module with the new one
+            $newPageModule = trim((string)$this->getBackendUser()->getTSConfigVal('options.overridePageModule'));
+            $pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
+
+            if (ExtensionManagementUtility::isLoaded('feedit')) {
+                $output[] = '<div class="typo3-adminPanel-form-group">';
+                $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+                $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[edit_displayFieldIcons]" value="0" />';
+                $output[] = '    <label for="edit_displayFieldIcons">';
+                $output[] = '      <input type="checkbox" id="edit_displayFieldIcons" name="TSFE_ADMIN_PANEL[edit_displayFieldIcons]" value="1"' .
+                            ($this->getBackendUser(
+                            )->uc['TSFE_adminConfig']['edit_displayFieldIcons'] ? ' checked="checked"' : '') .
+                            ' />';
+                $output[] = '      ' . $this->extGetLL('edit_displayFieldIcons');
+                $output[] = '    </label>';
+                $output[] = '  </div>';
+                $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+                $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[edit_displayIcons]" value="0" />';
+                $output[] = '    <label for="edit_displayIcons">';
+                $output[] = '      <input type="checkbox" id="edit_displayIcons" name="TSFE_ADMIN_PANEL[edit_displayIcons]" value="1"' .
+                            ($this->getBackendUser(
+                            )->uc['TSFE_adminConfig']['edit_displayIcons'] ? ' checked="checked"' : '') .
+                            ' />';
+                $output[] = '      ' . $this->extGetLL('edit_displayIcons');
+                $output[] = '    </label>';
+                $output[] = '  </div>';
+                $output[] = '</div>';
+            }
+
+            $output[] = $this->getBackendUser()->adminPanel->ext_makeToolBar();
+
+            $onClick = '
+                if (parent.opener && parent.opener.top && parent.opener.top.TS) {
+                    parent.opener.top.fsMod.recentIds["web"]=' .
+                       (int)$this->getTypoScriptFrontendController()->page['uid'] .
+                       ';
+                    if (parent.opener.top && parent.opener.top.nav_frame && parent.opener.top.nav_frame.refresh_nav) {
+                        parent.opener.top.nav_frame.refresh_nav();
+                    }
+                    parent.opener.top.goToModule("' .
+                       $pageModule .
+                       '");
+                    parent.opener.top.focus();
+                } else {
+                    vHWin=window.open(' .
+                       GeneralUtility::quoteJSvalue(BackendUtility::getBackendScript()) .
+                       ',\'' .
+                       md5('Typo3Backend-' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) .
+                       '\');
+                    vHWin.focus();
+                }
+                return false;
+            ';
+            $output[] = '<div class="typo3-adminPanel-form-group">';
+            $output[] = '  <a class="typo3-adminPanel-btn typo3-adminPanel-btn-default" href="#" onclick="' .
+                        htmlspecialchars($onClick) .
+                        '">';
+            $output[] = '    ' . $this->extGetLL('edit_openAB');
+            $output[] = '  </a>';
+            $output[] = '</div>';
+        }
+        return implode('', $output);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getIdentifier(): string
+    {
+        return 'edit';
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getLabel(): string
+    {
+        return $this->extGetLL('edit');
+    }
+
+    /**
+     * Initialize the edit module
+     * Includes the frontend edit initialization
+     *
+     * @todo move into fe_edit (including the module)
+     */
+    public function initializeModule(): void
+    {
+        $extFeEditLoaded = ExtensionManagementUtility::isLoaded('feedit');
+        $typoScriptFrontend = $this->getTypoScriptFrontendController();
+        $typoScriptFrontend->displayEditIcons = $this->getConfigurationOption('displayIcons');
+        $typoScriptFrontend->displayFieldEditIcons = $this->getConfigurationOption('displayFieldIcons');
+
+        if (GeneralUtility::_GP('ADMCMD_editIcons')) {
+            $typoScriptFrontend->displayFieldEditIcons = '1';
+        }
+        if ($extFeEditLoaded && $typoScriptFrontend->displayEditIcons) {
+            $typoScriptFrontend->set_no_cache('Admin Panel: Display edit icons', true);
+        }
+        if ($extFeEditLoaded && $typoScriptFrontend->displayFieldEditIcons) {
+            $typoScriptFrontend->set_no_cache('Admin Panel: Display field edit icons', true);
+        }
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function showFormSubmitButton(): bool
+    {
+        return true;
+    }
+
+    /**
+     * @return TypoScriptFrontendController
+     */
+    protected function getTypoScriptFrontendController(): TypoScriptFrontendController
+    {
+        return $GLOBALS['TSFE'];
+    }
+}
diff --git a/typo3/sysext/adminpanel/Classes/Modules/InfoModule.php b/typo3/sysext/adminpanel/Classes/Modules/InfoModule.php
new file mode 100644 (file)
index 0000000..c9e432d
--- /dev/null
@@ -0,0 +1,132 @@
+<?php
+declare(strict_types=1);
+
+namespace TYPO3\CMS\Adminpanel\Modules;
+
+/*
+ * 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!
+ */
+
+use TYPO3\CMS\Core\TimeTracker\TimeTracker;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+
+/**
+ * Admin Panel Info Module
+ */
+class InfoModule extends AbstractModule
+{
+    /**
+     * Creates the content for the "info" section ("module") of the Admin Panel
+     *
+     * @return string HTML content for the section. Consists of a string with table-rows with four columns.
+     * @see display()
+     */
+    public function getContent(): string
+    {
+        $output = [];
+        $tsfe = $this->getTypoScriptFrontendController();
+        if ($this->getBackendUser()->uc['TSFE_adminConfig']['display_info']) {
+            $tableArr = [];
+            if ($this->getConfigurationOption('noCache')) {
+                $theBytes = 0;
+                $count = 0;
+                if (!empty($tsfe->imagesOnPage)) {
+                    $tableArr[] = [$this->extGetLL('info_imagesOnPage'), count($tsfe->imagesOnPage), true];
+                    foreach ($GLOBALS['TSFE']->imagesOnPage as $file) {
+                        $fs = @filesize($file);
+                        $tableArr[] = [TAB . $file, GeneralUtility::formatSize($fs)];
+                        $theBytes += $fs;
+                        $count++;
+                    }
+                }
+                // Add an empty line
+                $tableArr[] = [$this->extGetLL('info_imagesSize'), GeneralUtility::formatSize($theBytes), true];
+                $tableArr[] = [
+                    $this->extGetLL('info_DocumentSize'),
+                    GeneralUtility::formatSize(strlen($tsfe->content)),
+                    true,
+                ];
+                $tableArr[] = ['', ''];
+            }
+            $tableArr[] = [$this->extGetLL('info_id'), $tsfe->id];
+            $tableArr[] = [$this->extGetLL('info_type'), $tsfe->type];
+            $tableArr[] = [$this->extGetLL('info_groupList'), $tsfe->gr_list];
+            $tableArr[] = [
+                $this->extGetLL('info_noCache'),
+                $this->extGetLL('info_noCache_' . ($tsfe->no_cache ? 'no' : 'yes')),
+            ];
+            $tableArr[] = [$this->extGetLL('info_countUserInt'), count($tsfe->config['INTincScript'] ?? [])];
+
+            if (!empty($tsfe->fe_user->user['uid'])) {
+                $tableArr[] = [$this->extGetLL('info_feuserName'), htmlspecialchars($tsfe->fe_user->user['username'])];
+                $tableArr[] = [$this->extGetLL('info_feuserId'), htmlspecialchars($tsfe->fe_user->user['uid'])];
+            }
+
+            $tableArr[] = [
+                $this->extGetLL('info_totalParsetime'),
+                $this->getTimeTracker()->getParseTime() . ' ms',
+                true,
+            ];
+            $table = '';
+            foreach ($tableArr as $key => $arr) {
+                $label = (isset($arr[2]) ? '<strong>' . $arr[0] . '</strong>' : $arr[0]);
+                $value = (string)$arr[1] !== '' ? $arr[1] : '';
+                $table .= '
+                    <tr>
+                        <td>' . $label . '</td>
+                        <td>' . htmlspecialchars((string)$value) . '</td>
+                    </tr>';
+            }
+
+            $output[] = '<div class="typo3-adminPanel-table-overflow">';
+            $output[] = '  <table class="typo3-adminPanel-table">';
+            $output[] = '    ' . $table;
+            $output[] = '  </table>';
+            $output[] = '</div>';
+        }
+
+        return implode('', $output);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getIdentifier(): string
+    {
+        return 'info';
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getLabel(): string
+    {
+        return $this->extGetLL('info');
+    }
+
+    /**
+     * @return TypoScriptFrontendController
+     */
+    protected function getTypoScriptFrontendController(): TypoScriptFrontendController
+    {
+        return $GLOBALS['TSFE'];
+    }
+
+    /**
+     * @return TimeTracker
+     */
+    protected function getTimeTracker(): TimeTracker
+    {
+        return GeneralUtility::makeInstance(TimeTracker::class);
+    }
+}
diff --git a/typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php b/typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php
new file mode 100644 (file)
index 0000000..1e7d96d
--- /dev/null
@@ -0,0 +1,266 @@
+<?php
+declare(strict_types=1);
+
+namespace TYPO3\CMS\Adminpanel\Modules;
+
+/*
+ * 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!
+ */
+
+use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
+use TYPO3\CMS\Core\Type\Bitmask\Permission;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;
+use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+
+/**
+ * Admin Panel Preview Module
+ */
+class PreviewModule extends AbstractModule
+{
+    /**
+     * Force the preview panel to be opened
+     *
+     * @var bool
+     */
+    protected $forceOpen = false;
+
+    /**
+     * @inheritdoc
+     */
+    public function getAdditionalJavaScriptCode(): string
+    {
+        return 'TSFEtypo3FormFieldSet("TSFE_ADMIN_PANEL[preview_simulateDate]", "datetime", "", 0, 0);';
+    }
+
+    /**
+     * Creates the content for the "preview" section ("module") of the Admin Panel
+     *
+     * @return string HTML content for the section. Consists of a string with table-rows with four columns.
+     * @see display()
+     * @throws \InvalidArgumentException
+     */
+    public function getContent(): string
+    {
+        $output = [];
+        if ($this->getBackendUser()->uc['TSFE_adminConfig']['display_preview']) {
+            $output[] = '<div class="typo3-adminPanel-form-group">';
+            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[preview_showHiddenPages]" value="0" />';
+            $output[] = '    <label for="preview_showHiddenPages">';
+            $output[] = '      <input type="checkbox" id="preview_showHiddenPages" name="TSFE_ADMIN_PANEL[preview_showHiddenPages]" value="1"' .
+                        ($this->getBackendUser(
+                        )->uc['TSFE_adminConfig']['preview_showHiddenPages'] ? ' checked="checked"' : '') .
+                        ' />';
+            $output[] = '      ' . $this->extGetLL('preview_showHiddenPages');
+            $output[] = '    </label>';
+            $output[] = '  </div>';
+            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[preview_showHiddenRecords]" value="0" />';
+            $output[] = '    <label for="preview_showHiddenRecords">';
+            $output[] = '      <input type="checkbox" id="preview_showHiddenRecords" name="TSFE_ADMIN_PANEL[preview_showHiddenRecords]" value="1"' .
+                        ($this->getBackendUser(
+                        )->uc['TSFE_adminConfig']['preview_showHiddenRecords'] ? ' checked="checked"' : '') .
+                        ' />';
+            $output[] = '      ' . $this->extGetLL('preview_showHiddenRecords');
+            $output[] = '    </label>';
+            $output[] = '  </div>';
+            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[preview_showFluidDebug]" value="0" />';
+            $output[] = '    <label for="preview_showFluidDebug">';
+            $output[] = '      <input type="checkbox" id="preview_showFluidDebug" name="TSFE_ADMIN_PANEL[preview_showFluidDebug]" value="1"' .
+                        ($this->getBackendUser(
+                        )->uc['TSFE_adminConfig']['preview_showFluidDebug'] ? ' checked="checked"' : '') .
+                        ' />';
+            $output[] = '      ' . $this->extGetLL('preview_showFluidDebug');
+            $output[] = '    </label>';
+            $output[] = '  </div>';
+            $output[] = '</div>';
+
+            // Simulate date
+            $output[] = '<div class="typo3-adminPanel-form-group">';
+            $output[] = '  <label for="preview_simulateDate">';
+            $output[] = '    ' . $this->extGetLL('preview_simulateDate');
+            $output[] = '  </label>';
+            $output[] = '  <input type="text" id="preview_simulateDate" name="TSFE_ADMIN_PANEL[preview_simulateDate]_hr" onchange="TSFEtypo3FormFieldGet(\'TSFE_ADMIN_PANEL[preview_simulateDate]\', \'datetime\', \'\', 1,0);" />';
+            // the hidden field must be placed after the _hr field to avoid the timestamp being overridden by the date string
+            $output[] = '  <input type="hidden" name="TSFE_ADMIN_PANEL[preview_simulateDate]" value="' .
+                        $this->getBackendUser()->uc['TSFE_adminConfig']['preview_simulateDate'] .
+                        '" />';
+            $output[] = '</div>';
+
+            // Frontend Usergroups
+            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
+                ->getQueryBuilderForTable('fe_groups');
+            $queryBuilder->getRestrictions()
+                ->removeAll()
+                ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+            $optionCount = $queryBuilder->count('fe_groups.uid')
+                ->from('fe_groups')
+                ->from('pages')
+                ->where(
+                    $queryBuilder->expr()->eq('pages.uid', $queryBuilder->quoteIdentifier('fe_groups.pid')),
+                    $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW)
+                )
+                ->execute()
+                ->fetchColumn(0);
+            if ($optionCount > 0) {
+                $result = $queryBuilder->select('fe_groups.uid', 'fe_groups.title')
+                    ->from('fe_groups')
+                    ->from('pages')
+                    ->where(
+                        $queryBuilder->expr()->eq('pages.uid', $queryBuilder->quoteIdentifier('fe_groups.pid')),
+                        $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW)
+                    )
+                    ->orderBy('fe_groups.title')
+                    ->execute();
+                $output[] = '<div class="typo3-adminPanel-form-group">';
+                $output[] = '  <label for="preview_simulateUserGroup">';
+                $output[] = '    ' . $this->extGetLL('preview_simulateUserGroup');
+                $output[] = '  </label>';
+                $output[] = '  <select id="preview_simulateUserGroup" name="TSFE_ADMIN_PANEL[preview_simulateUserGroup]">';
+                $output[] = '    <option value="0">&nbsp;</option>';
+                while ($row = $result->fetch()) {
+                    $output[] = '<option value="' .
+                                (int)$row['uid'] .
+                                '" ' .
+                                ($this->getBackendUser()->uc['TSFE_adminConfig']['preview_simulateUserGroup'] ===
+                                 $row['uid'] ? ' selected="selected"' : '') .
+                                '>';
+                    $output[] = htmlspecialchars($row['title'] . ' [' . $row['uid'] . ']');
+                    $output[] = '</option>';
+                }
+                $output[] = '  </select>';
+                $output[] = '</div>';
+            }
+        }
+        return implode('', $output);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getIdentifier(): string
+    {
+        return 'preview';
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getLabel(): string
+    {
+        return $this->extGetLL('preview');
+    }
+
+    public function initializeModule(): void
+    {
+        $this->initializeFrontendPreview();
+        if (GeneralUtility::_GP('ADMCMD_simUser')) {
+            $this->getBackendUser()->uc['TSFE_adminConfig']['preview_simulateUserGroup'] = (int)GeneralUtility::_GP(
+                'ADMCMD_simUser'
+            );
+            $this->forceOpen = true;
+        }
+        if (GeneralUtility::_GP('ADMCMD_simTime')) {
+            $this->getBackendUser()->uc['TSFE_adminConfig']['preview_simulateDate'] = (int)GeneralUtility::_GP(
+                'ADMCMD_simTime'
+            );
+            $this->forceOpen = true;
+        }
+    }
+
+    /**
+     * Force module to be shown if either time or users/groups are simulated
+     *
+     * @return bool
+     */
+    public function isShown(): bool
+    {
+        if ($this->forceOpen) {
+            return true;
+        }
+        return parent::isShown();
+    }
+
+    /**
+     * Clear page cache if fluid debug output is enabled
+     *
+     * @param array $input
+     */
+    public function onSubmit(array $input): void
+    {
+        if ($input['preview_showFluidDebug'] ?? false) {
+            $theStartId = (int)$this->getTypoScriptFrontendController()->id;
+            $this->getTypoScriptFrontendController()
+                ->clearPageCacheContent_pidList(
+                    $this->getBackendUser()->extGetTreeList(
+                        $theStartId,
+                        0,
+                        0,
+                        $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW)
+                    ) . $theStartId
+                );
+        }
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function showFormSubmitButton(): bool
+    {
+        return true;
+    }
+
+    /**
+     * @return TypoScriptFrontendController
+     */
+    protected function getTypoScriptFrontendController(): TypoScriptFrontendController
+    {
+        return $GLOBALS['TSFE'];
+    }
+
+    /**
+     * Initialize frontend preview functionality incl.
+     * simulation of users or time
+     */
+    protected function initializeFrontendPreview()
+    {
+        $tsfe = $this->getTypoScriptFrontendController();
+        $tsfe->clear_preview();
+        $tsfe->fePreview = 1;
+        $tsfe->showHiddenPage = (bool)$this->getConfigurationOption('showHiddenPages');
+        $tsfe->showHiddenRecords = (bool)$this->getConfigurationOption('showHiddenRecords');
+        // Simulate date
+        $simTime = $this->getConfigurationOption('simulateDate');
+        if ($simTime) {
+            $GLOBALS['SIM_EXEC_TIME'] = $simTime;
+            $GLOBALS['SIM_ACCESS_TIME'] = $simTime - $simTime % 60;
+        }
+        // simulate user
+        $tsfe->simUserGroup = $this->getConfigurationOption('simulateUserGroup');
+        if ($tsfe->simUserGroup) {
+            if ($tsfe->fe_user->user) {
+                $tsfe->fe_user->user[$tsfe->fe_user->usergroup_column] = $tsfe->simUserGroup;
+            } else {
+                $tsfe->fe_user = GeneralUtility::makeInstance(FrontendUserAuthentication::class);
+                $tsfe->fe_user->user = [
+                    $tsfe->fe_user->usergroup_column => $tsfe->simUserGroup,
+                ];
+            }
+        }
+        if (!$tsfe->simUserGroup && !$simTime && !$tsfe->showHiddenPage && !$tsfe->showHiddenRecords) {
+            $tsfe->fePreview = 0;
+        }
+    }
+}
diff --git a/typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php b/typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php
new file mode 100644 (file)
index 0000000..aaedcc3
--- /dev/null
@@ -0,0 +1,162 @@
+<?php
+declare(strict_types=1);
+
+namespace TYPO3\CMS\Adminpanel\Modules;
+
+/*
+ * 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!
+ */
+
+use TYPO3\CMS\Core\TimeTracker\TimeTracker;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+
+/**
+ * Admin Panel TypoScript Debug Module
+ */
+class TsDebugModule extends AbstractModule
+{
+
+    /**
+     * Creates the content for the "tsdebug" section ("module") of the Admin Panel
+     *
+     * @return string HTML content for the section. Consists of a string with table-rows with four columns.
+     */
+    public function getContent(): string
+    {
+        $output = [];
+        $beuser = $this->getBackendUser();
+        if ($beuser->uc['TSFE_adminConfig']['display_tsdebug']) {
+            $output[] = '<div class="typo3-adminPanel-form-group">';
+            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_tree]" value="0" />';
+            $output[] = '    <label for="tsdebug_tree">';
+            $output[] = '      <input type="checkbox" id="tsdebug_tree" name="TSFE_ADMIN_PANEL[tsdebug_tree]" value="1"' .
+                        ($this->getBackendUser()->uc['TSFE_adminConfig']['tsdebug_tree'] ? ' checked="checked"' : '') .
+                        ' />';
+            $output[] = '      ' . $this->extGetLL('tsdebug_tree');
+            $output[] = '    </label>';
+            $output[] = '  </div>';
+            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_displayTimes]" value="0" />';
+            $output[] = '    <label for="tsdebug_displayTimes">';
+            $output[] = '      <input type="checkbox" id="tsdebug_displayTimes" name="TSFE_ADMIN_PANEL[tsdebug_displayTimes]" value="1"' .
+                        ($this->getBackendUser(
+                        )->uc['TSFE_adminConfig']['tsdebug_displayTimes'] ? ' checked="checked"' : '') .
+                        ' />';
+            $output[] = '      ' . $this->extGetLL('tsdebug_displayTimes');
+            $output[] = '    </label>';
+            $output[] = '  </div>';
+            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_displayMessages]" value="0" />';
+            $output[] = '    <label for="tsdebug_displayMessages">';
+            $output[] = '      <input type="checkbox" id="tsdebug_displayMessages" name="TSFE_ADMIN_PANEL[tsdebug_displayMessages]" value="1"' .
+                        ($this->getBackendUser(
+                        )->uc['TSFE_adminConfig']['tsdebug_displayMessages'] ? ' checked="checked"' : '') .
+                        ' />';
+            $output[] = '      ' . $this->extGetLL('tsdebug_displayMessages');
+            $output[] = '    </label>';
+            $output[] = '  </div>';
+            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_LR]" value="0" />';
+            $output[] = '    <label for="tsdebug_LR">';
+            $output[] = '      <input type="checkbox" id="tsdebug_LR" name="TSFE_ADMIN_PANEL[tsdebug_LR]" value="1"' .
+                        ($this->getBackendUser()->uc['TSFE_adminConfig']['tsdebug_LR'] ? ' checked="checked"' : '') .
+                        ' />';
+            $output[] = '      ' . $this->extGetLL('tsdebug_LR');
+            $output[] = '    </label>';
+            $output[] = '  </div>';
+            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_displayContent]" value="0" />';
+            $output[] = '    <label for="tsdebug_displayContent">';
+            $output[] = '      <input type="checkbox" id="tsdebug_displayContent" name="TSFE_ADMIN_PANEL[tsdebug_displayContent]" value="1"' .
+                        ($this->getBackendUser(
+                        )->uc['TSFE_adminConfig']['tsdebug_displayContent'] ? ' checked="checked"' : '') .
+                        ' />';
+            $output[] = '      ' . $this->extGetLL('tsdebug_displayContent');
+            $output[] = '    </label>';
+            $output[] = '  </div>';
+            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
+            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_forceTemplateParsing]" value="0" />';
+            $output[] = '    <label for="tsdebug_forceTemplateParsing">';
+            $output[] = '      <input type="checkbox" id="tsdebug_forceTemplateParsing" name="TSFE_ADMIN_PANEL[tsdebug_forceTemplateParsing]" value="1"' .
+                        ($this->getBackendUser(
+                        )->uc['TSFE_adminConfig']['tsdebug_forceTemplateParsing'] ? ' checked="checked"' : '') .
+                        ' />';
+            $output[] = '      ' . $this->extGetLL('tsdebug_forceTemplateParsing');
+            $output[] = '    </label>';
+            $output[] = '  </div>';
+            $output[] = '</div>';
+
+            $timeTracker = $this->getTimeTracker();
+            $timeTracker->printConf['flag_tree'] = $this->getConfigurationOption('tree');
+            $timeTracker->printConf['allTime'] = $this->getConfigurationOption('displayTimes');
+            $timeTracker->printConf['flag_messages'] = $this->getConfigurationOption('displayMessages');
+            $timeTracker->printConf['flag_content'] = $this->getConfigurationOption('displayContent');
+            $output[] = $timeTracker->printTSlog();
+        }
+        return implode('', $output);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getIdentifier(): string
+    {
+        return 'tsdebug';
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function getLabel(): string
+    {
+        return $this->extGetLL('tsdebug');
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function initializeModule(): void
+    {
+        $typoScriptFrontend = $this->getTypoScriptFrontendController();
+        $typoScriptFrontend->forceTemplateParsing = (bool)$this->getConfigurationOption('forceTemplateParsing');
+        if ($typoScriptFrontend->forceTemplateParsing) {
+            $typoScriptFrontend->set_no_cache('Admin Panel: Force template parsing', true);
+        }
+        $this->getTimeTracker()->LR = (bool)$this->getConfigurationOption('LR');
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function showFormSubmitButton(): bool
+    {
+        return true;
+    }
+
+    /**
+     * @return TimeTracker
+     */
+    protected function getTimeTracker(): TimeTracker
+    {
+        return GeneralUtility::makeInstance(TimeTracker::class);
+    }
+
+    /**
+     * @return TypoScriptFrontendController
+     */
+    protected function getTypoScriptFrontendController(): TypoScriptFrontendController
+    {
+        return $GLOBALS['TSFE'];
+    }
+}
diff --git a/typo3/sysext/adminpanel/Classes/View/AdminPanelView.php b/typo3/sysext/adminpanel/Classes/View/AdminPanelView.php
new file mode 100644 (file)
index 0000000..8915ae0
--- /dev/null
@@ -0,0 +1,827 @@
+<?php
+
+namespace TYPO3\CMS\Adminpanel\View;
+
+/*
+ * 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!
+ */
+
+use TYPO3\CMS\Adminpanel\Modules\AdminPanelModuleInterface;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Cache\CacheManager;
+use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Service\DependencyOrderingService;
+use TYPO3\CMS\Core\Type\Bitmask\Permission;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\PathUtility;
+
+/**
+ * View class for the admin panel in frontend editing.
+ */
+class AdminPanelView
+{
+    /**
+     * Determines whether the update button should be shown.
+     *
+     * @var bool
+     */
+    protected $extNeedUpdate = false;
+
+    /**
+     * Force preview
+     *
+     * @var bool
+     */
+    protected $ext_forcePreview = false;
+
+    /**
+     * @var string
+     */
+    protected $extJSCODE = '';
+
+    /**
+     * @var IconFactory
+     */
+    protected $iconFactory;
+
+    /**
+     * Array of adminPanel modules
+     *
+     * @var AdminPanelModuleInterface[]
+     */
+    protected $modules = [];
+
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->initialize();
+    }
+
+    /**
+     * Initializes settings for the admin panel.
+     */
+    public function initialize()
+    {
+        $this->validateSortAndInitializeModules();
+        $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+        $this->saveConfiguration();
+
+        foreach ($this->modules as $module) {
+            if ($module->isEnabled()) {
+                $module->initializeModule();
+            }
+        }
+    }
+
+    /**
+     * Returns a link tag with the admin panel stylesheet
+     * defined using TBE_STYLES
+     *
+     * @return string
+     */
+    protected function getAdminPanelStylesheet(): string
+    {
+        $result = '';
+        if (!empty($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) {
+            $stylesheet = GeneralUtility::locationHeaderUrl($GLOBALS['TBE_STYLES']['stylesheets']['admPanel']);
+            $result = '<link rel="stylesheet" type="text/css" href="' . htmlspecialchars($stylesheet) . '" />';
+        }
+        return $result;
+    }
+
+    /**
+     * Render a single module with header panel
+     *
+     * @param \TYPO3\CMS\Frontend\AdminPanel\AdminPanelModuleInterface $module
+     * @return string
+     */
+    protected function getModule(AdminPanelModuleInterface $module): string
+    {
+        $output = [];
+
+        if ($module->isEnabled()) {
+            $output[] = '<div class="typo3-adminPanel-section typo3-adminPanel-section-' .
+                        ($module->isOpen() ? 'open' : 'closed') .
+                        '">';
+            $output[] = '  <div class="typo3-adminPanel-section-title">';
+            $output[] = '    ' . $this->getSectionOpenerLink($module);
+            $output[] = '  </div>';
+            if ($module->isOpen()) {
+                $output[] = '<div class="typo3-adminPanel-section-body">';
+                $output[] = '  ' . $module->getContent();
+                $output[] = '</div>';
+            }
+            $output[] = '</div>';
+        }
+
+        return implode('', $output);
+    }
+
+    /**
+     * Creates and returns the HTML code for the Admin Panel in the TSFE frontend.
+     *
+     * @throws \UnexpectedValueException
+     * @return string HTML for the Admin Panel
+     */
+    public function display()
+    {
+        $this->getLanguageService()->includeLLFile('EXT:lang/Resources/Private/Language/locallang_tsfe.xlf');
+
+        $moduleContent = '';
+
+        if ($this->isAdminPanelActivated()) {
+            foreach ($this->modules as $module) {
+                if ($module->isOpen()) {
+                    $this->extNeedUpdate = !$this->extNeedUpdate ? $module->showFormSubmitButton() : true;
+                    $this->extJSCODE .= $module->getAdditionalJavaScriptCode();
+                }
+                $moduleContent .= $this->getModule($module);
+            }
+
+            foreach (
+                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_adminpanel.php']['extendAdminPanel']
+                ??
+                [] as $className
+            ) {
+                trigger_error(
+                    'The hook $GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/class.tslib_adminpanel.php\'][\'extendAdminPanel\'] is deprecated, register an AdminPanelModule instead.',
+                    E_USER_DEPRECATED
+                );
+                $hookObject = GeneralUtility::makeInstance($className);
+                if (!$hookObject instanceof AdminPanelViewHookInterface) {
+                    throw new \UnexpectedValueException(
+                        $className . ' must implement interface ' . AdminPanelViewHookInterface::class,
+                        1311942539
+                    );
+                }
+                $content = $hookObject->extendAdminPanel($moduleContent, $this);
+                if ($content) {
+                    $moduleContent .= '<div class="typo3-adminPanel-section typo3-adminPanel-section-open">';
+                    $moduleContent .= '  <div class="typo3-adminPanel-section-body">';
+                    $moduleContent .= '    ' . $content;
+                    $moduleContent .= '  </div>';
+                    $moduleContent .= '</div>';
+                }
+            }
+        }
+
+        $output = [];
+        $output[] = '<!-- TYPO3 Admin panel start -->';
+        $output[] = '<a id="TSFE_ADMIN_PANEL"></a>';
+        $output[] = '<form id="TSFE_ADMIN_PANEL_FORM" name="TSFE_ADMIN_PANEL_FORM" style="display: none;" action="' . htmlspecialchars(GeneralUtility::getIndpEnv('TYPO3_REQUEST_SCRIPT')) . '#TSFE_ADMIN_PANEL" method="get" onsubmit="document.forms.TSFE_ADMIN_PANEL_FORM[\'TSFE_ADMIN_PANEL[DUMMY]\'].value=Math.random().toString().substring(2,8)">';
+        if (!GeneralUtility::_GET('id')) {
+            $output[] = '<input type="hidden" name="id" value="' . $this->getTypoScriptFrontendController()->id . '" />';
+        }
+        // The dummy field is needed for Firefox: to force a page reload on submit
+        // which must change the form value with JavaScript (see "onsubmit" attribute of the "form" element")
+        $output[] = '  <input type="hidden" name="TSFE_ADMIN_PANEL[DUMMY]" value="" />';
+        foreach (GeneralUtility::_GET() as $key => $value) {
+            if ($key !== 'TSFE_ADMIN_PANEL') {
+                if (is_array($value)) {
+                    $output[] = $this->getHiddenFields($key, $value);
+                } else {
+                    $output[] = '<input type="hidden" name="' . htmlspecialchars($key) . '" value="' . htmlspecialchars($value) . '" />';
+                }
+            }
+        }
+        $output[] = '  <input type="hidden" name="TSFE_ADMIN_PANEL[display_top]" value="0" />';
+        $output[] = '  <input id="typo3AdminPanelEnable" type="checkbox" onchange="document.TSFE_ADMIN_PANEL_FORM.submit();" name="TSFE_ADMIN_PANEL[display_top]" value="1"' .
+                    ($this->isAdminPanelActivated() ? ' checked="checked"' : '') .
+                    '/>';
+        $output[] = '  <input id="typo3AdminPanelCollapse" type="checkbox" value="1" />';
+        $output[] = '  <div class="typo3-adminPanel typo3-adminPanel-state-' .
+                    ($this->isAdminPanelActivated() ? 'open' : 'closed') .
+                    '">';
+        $output[] = '    <div class="typo3-adminPanel-header">';
+        $output[] = '      <span class="typo3-adminPanel-header-title">' . $this->extGetLL('adminPanelTitle') . '</span>';
+        $output[] = '      <span class="typo3-adminPanel-header-user">' . htmlspecialchars($this->getBackendUser()->user['username']) . '</span>';
+        $output[] = '      <label for="typo3AdminPanelEnable" class="typo3-adminPanel-header-enable">';
+        $output[] = '        <span class="typo3-adminPanel-header-enable-enabled">';
+        $output[] = '          ' . $this->iconFactory->getIcon('actions-edit-hide', Icon::SIZE_SMALL)->render('inline');
+        $output[] = '        </span>';
+        $output[] = '        <span class="typo3-adminPanel-header-enable-disabled">';
+        $output[] = '          ' . $this->iconFactory->getIcon('actions-edit-unhide', Icon::SIZE_SMALL)->render('inline');
+        $output[] = '        </span>';
+        $output[] = '      </label>';
+        $output[] = '      <label for="typo3AdminPanelCollapse" class="typo3-adminPanel-header-collapse">';
+        $output[] = '        <span class="typo3-adminPanel-header-collapse-enabled">';
+        $output[] = '          ' . $this->iconFactory->getIcon('actions-view-list-collapse', Icon::SIZE_SMALL)->render('inline');
+        $output[] = '        </span>';
+        $output[] = '        <span class="typo3-adminPanel-header-collapse-disabled">';
+        $output[] = '          ' . $this->iconFactory->getIcon('actions-view-list-expand', Icon::SIZE_SMALL)->render('inline');
+        $output[] = '        </span>';
+        $output[] = '      </label>';
+        $output[] = '    </div>';
+        if ($moduleContent && $this->extNeedUpdate) {
+            $output[] = '<div class="typo3-adminPanel-actions">';
+            $output[] = '  <input class="typo3-adminPanel-btn typo3-adminPanel-btn-dark" type="submit" value="' . $this->extGetLL('update') . '" />';
+            $output[] = '</div>';
+        }
+        $output[] = '    <div class="typo3-adminPanel-body">';
+        $output[] = '      ' . $moduleContent;
+        $output[] = '    </div>';
+        $output[] = '  </div>';
+        $output[] = '</form>';
+        if ($this->getBackendUser()->uc['TSFE_adminConfig']['display_top']) {
+            $evalFieldJavaScriptFile = GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Public/JavaScript/jsfunc.evalfield.js');
+            $output[] = '<script type="text/javascript" src="' . htmlspecialchars(PathUtility::getAbsoluteWebPath($evalFieldJavaScriptFile)) . '"></script>';
+            $output[] = '<script type="text/javascript">/*<![CDATA[*/' . GeneralUtility::minifyJavaScript('
+                               var evalFunc = new evalFunc();
+                                       // TSFEtypo3FormFieldSet()
+                               function TSFEtypo3FormFieldSet(theField, evallist, is_in, checkbox, checkboxValue) {    //
+                                       var theFObj = new evalFunc_dummy (evallist,is_in, checkbox, checkboxValue);
+                                       var theValue = document.TSFE_ADMIN_PANEL_FORM[theField].value;
+                                       if (checkbox && theValue==checkboxValue) {
+                                               document.TSFE_ADMIN_PANEL_FORM[theField+"_hr"].value="";
+                                               alert(theField);
+                                               document.TSFE_ADMIN_PANEL_FORM[theField+"_cb"].checked = "";
+                                       } else {
+                                               document.TSFE_ADMIN_PANEL_FORM[theField+"_hr"].value = evalFunc.outputObjValue(theFObj, theValue);
+                                               if (document.TSFE_ADMIN_PANEL_FORM[theField+"_cb"]) {
+                                                       document.TSFE_ADMIN_PANEL_FORM[theField+"_cb"].checked = "on";
+                                               }
+                                       }
+                               }
+                                       // TSFEtypo3FormFieldGet()
+                               function TSFEtypo3FormFieldGet(theField, evallist, is_in, checkbox, checkboxValue, checkbox_off) {      //
+                                       var theFObj = new evalFunc_dummy (evallist,is_in, checkbox, checkboxValue);
+                                       if (checkbox_off) {
+                                               document.TSFE_ADMIN_PANEL_FORM[theField].value=checkboxValue;
+                                       }else{
+                                               document.TSFE_ADMIN_PANEL_FORM[theField].value = evalFunc.evalObjValue(theFObj, document.TSFE_ADMIN_PANEL_FORM[theField+"_hr"].value);
+                                       }
+                                       TSFEtypo3FormFieldSet(theField, evallist, is_in, checkbox, checkboxValue);
+                               }') . '/*]]>*/</script>';
+            $output[] = '<script language="javascript" type="text/javascript">' . $this->extJSCODE . '</script>';
+        }
+        $cssFileLocation = GeneralUtility::getFileAbsFileName('EXT:adminpanel/Resources/Public/Css/adminpanel.css');
+        $output[] = '<link type="text/css" rel="stylesheet" href="' . htmlspecialchars(PathUtility::getAbsoluteWebPath($cssFileLocation)) . '" media="all" />';
+        $output[] = $this->getAdminPanelStylesheet();
+        $output[] = '<!-- TYPO3 admin panel end -->';
+
+        return implode('', $output);
+    }
+
+    /**
+     * Fetches recursively all GET parameters as hidden fields.
+     * Called from display()
+     *
+     * @param string $key Current key
+     * @param array $val Current value
+     * @return string Hidden fields HTML-code
+     * @see display()
+     */
+    protected function getHiddenFields($key, array $val)
+    {
+        $out = '';
+        foreach ($val as $k => $v) {
+            if (is_array($v)) {
+                $out .= $this->getHiddenFields($key . '[' . $k . ']', $v);
+            } else {
+                $out .= '<input type="hidden" name="' . htmlspecialchars($key) . '[' . htmlspecialchars($k) . ']" value="' . htmlspecialchars($v) . '">' . LF;
+            }
+        }
+        return $out;
+    }
+
+    /**
+     * Returns true if admin panel was activated
+     * (switched "on" via GUI)
+     *
+     * @return bool
+     */
+    protected function isAdminPanelActivated(): bool
+    {
+        return $this->getBackendUser()->uc['TSFE_adminConfig']['display_top'] ?? false;
+    }
+
+    /**
+     * Save admin panel configuration to backend user UC
+     */
+    protected function saveConfiguration()
+    {
+        $input = GeneralUtility::_GP('TSFE_ADMIN_PANEL');
+        $beUser = $this->getBackendUser();
+        if (is_array($input)) {
+            // Setting
+            $beUser->uc['TSFE_adminConfig'] = array_merge(
+                !is_array($beUser->uc['TSFE_adminConfig']) ? [] : $beUser->uc['TSFE_adminConfig'],
+                $input
+            );
+            unset($beUser->uc['TSFE_adminConfig']['action']);
+
+            foreach ($this->modules as $module) {
+                if ($module->isEnabled() && $module->isOpen()) {
+                    $module->onSubmit($input);
+                }
+            }
+            // Saving
+            $beUser->writeUC();
+            // Flush fluid template cache
+            $cacheManager = new CacheManager();
+            $cacheManager->setCacheConfigurations($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']);
+            $cacheManager->getCache('fluid_template')->flush();
+        }
+    }
+
+    /**
+     * Validates, sorts and initiates the registered modules
+     *
+     * @throws \RuntimeException
+     */
+    protected function validateSortAndInitializeModules(): void
+    {
+        $modules = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules'] ?? [];
+        if (empty($modules)) {
+            return;
+        }
+        foreach ($modules as $identifier => $configuration) {
+            if (empty($configuration) || !is_array($configuration)) {
+                throw new \RuntimeException(
+                    'Missing configuration for module "' . $identifier . '".',
+                    1519490105
+                );
+            }
+            if (!is_string($configuration['module']) ||
+                empty($configuration['module']) ||
+                !class_exists($configuration['module']) ||
+                !is_subclass_of(
+                    $configuration['module'],
+                    AdminPanelModuleInterface::class
+                )) {
+                throw new \RuntimeException(
+                    'The module "' .
+                    $identifier .
+                    '" defines an invalid module class. Ensure the class exists and implements the "' .
+                    AdminPanelModuleInterface::class .
+                    '".',
+                    1519490112
+                );
+            }
+        }
+
+        $orderedModules = GeneralUtility::makeInstance(DependencyOrderingService::class)->orderByDependencies(
+            $modules
+        );
+
+        foreach ($orderedModules as $module) {
+            $this->modules[] = GeneralUtility::makeInstance($module['module']);
+        }
+    }
+
+    /*****************************************************
+     * Admin Panel Layout Helper functions
+     ****************************************************/
+
+    /**
+     * Wraps a string in a link which will open/close a certain part of the Admin Panel
+     *
+     * @param \TYPO3\CMS\Frontend\AdminPanel\AdminPanelModuleInterface $module
+     * @return string
+     */
+    protected function getSectionOpenerLink(AdminPanelModuleInterface $module): string
+    {
+        $identifier = $module->getIdentifier();
+        $onclick = 'document.TSFE_ADMIN_PANEL_FORM[' .
+                   GeneralUtility::quoteJSvalue('TSFE_ADMIN_PANEL[display_' . $identifier . ']') .
+                   '].value=' .
+                   ($this->getBackendUser()->uc['TSFE_adminConfig']['display_' . $identifier] ? '0' : '1') .
+                   ';document.TSFE_ADMIN_PANEL_FORM.submit();return false;';
+
+        $output = [];
+        $output[] = '<span class="typo3-adminPanel-section-title-identifier"></span>';
+        $output[] = '<a href="javascript:void(0)" onclick="' . htmlspecialchars($onclick) . '">';
+        $output[] = '  ' . htmlspecialchars($module->getLabel());
+        $output[] = '</a>';
+        $output[] = '<input type="hidden" name="TSFE_ADMIN_PANEL[display_' .
+                    $identifier .
+                    ']" value="' .
+                    (int)$module->isOpen() .
+                    '" />';
+
+        return implode('', $output);
+    }
+
+    /**
+     * Creates the tool bar links for the "edit" section of the Admin Panel.
+     *
+     * @return string A string containing images wrapped in <a>-tags linking them to proper functions.
+     */
+    public function ext_makeToolBar()
+    {
+        $tsfe = $this->getTypoScriptFrontendController();
+        //  If mod.newContentElementWizard.override is set, use that extension's create new content wizard instead:
+        $tsConfig = BackendUtility::getModTSconfig($tsfe->page['uid'], 'mod');
+        $moduleName = $tsConfig['properties']['newContentElementWizard.']['override'] ?? 'new_content_element';
+        /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
+        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $perms = $this->getBackendUser()->calcPerms($tsfe->page);
+        $langAllowed = $this->getBackendUser()->checkLanguageAccess($tsfe->sys_language_uid);
+        $id = $tsfe->id;
+        $returnUrl = GeneralUtility::getIndpEnv('REQUEST_URI');
+        $classes = 'typo3-adminPanel-btn typo3-adminPanel-btn-default';
+        $output = [];
+        $output[] = '<div class="typo3-adminPanel-form-group">';
+        $output[] = '  <div class="typo3-adminPanel-btn-group" role="group">';
+
+        // History
+        $link = (string)$uriBuilder->buildUriFromRoute(
+            'record_history',
+            [
+                'element' => 'pages:' . $id,
+                'returnUrl' => $returnUrl
+            ]
+        );
+        $title = $this->extGetLL('edit_recordHistory');
+        $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '#latest" title="' . $title . '">';
+        $output[] = '  ' . $this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL)->render();
+        $output[] = '</a>';
+
+        // New Content
+        if ($perms & Permission::CONTENT_EDIT && $langAllowed) {
+            $linkParameters = [
+                'id' => $id,
+                'returnUrl' => $returnUrl,
+            ];
+            if (!empty($tsfe->sys_language_uid)) {
+                $linkParameters['sys_language_uid'] = $tsfe->sys_language_uid;
+            }
+            $link = (string)$uriBuilder->buildUriFromRoute($moduleName, $linkParameters);
+            $icon = $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render();
+            $title = $this->extGetLL('edit_newContentElement');
+            $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
+            $output[] = '  ' . $icon;
+            $output[] = '</a>';
+        }
+
+        // Move Page
+        if ($perms & Permission::PAGE_EDIT) {
+            $link = (string)$uriBuilder->buildUriFromRoute(
+                'move_element',
+                [
+                    'table' => 'pages',
+                    'uid' => $id,
+                    'returnUrl' => $returnUrl
+                ]
+            );
+            $icon = $this->iconFactory->getIcon('actions-document-move', Icon::SIZE_SMALL)->render();
+            $title = $this->extGetLL('edit_move_page');
+            $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
+            $output[] = '  ' . $icon;
+            $output[] = '</a>';
+        }
+
+        // New Page
+        if ($perms & Permission::PAGE_NEW) {
+            $link = (string)$uriBuilder->buildUriFromRoute(
+                'db_new',
+                [
+                    'id' => $id,
+                    'pagesOnly' => 1,
+                    'returnUrl' => $returnUrl
+                ]
+            );
+            $icon = $this->iconFactory->getIcon('actions-page-new', Icon::SIZE_SMALL)->render();
+            $title = $this->extGetLL('edit_newPage');
+            $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
+            $output[] = '  ' . $icon;
+            $output[] = '</a>';
+        }
+
+        // Edit Page
+        if ($perms & Permission::PAGE_EDIT) {
+            $link = (string)$uriBuilder->buildUriFromRoute(
+                'record_edit',
+                [
+                    'edit[pages][' . $id . ']' => 'edit',
+                    'noView' => 1,
+                    'returnUrl' => $returnUrl
+                ]
+            );
+            $icon = $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)->render();
+            $title = $this->extGetLL('edit_editPageProperties');
+            $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
+            $output[] = '  ' . $icon;
+            $output[] = '</a>';
+        }
+
+        // Edit Page Overlay
+        if ($perms & Permission::PAGE_EDIT && $tsfe->sys_language_uid && $langAllowed) {
+            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
+                ->getQueryBuilderForTable('pages');
+            $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
+            $row = $queryBuilder
+                ->select('uid', 'pid', 't3ver_state')
+                ->from('pages')
+                ->where(
+                    $queryBuilder->expr()->eq(
+                        $GLOBALS['TCA']['pages']['ctrl']['transOrigPointerField'],
+                        $queryBuilder->createNamedParameter($id, \PDO::PARAM_INT)
+                    ),
+                    $queryBuilder->expr()->eq(
+                        $GLOBALS['TCA']['pages']['ctrl']['languageField'],
+                        $queryBuilder->createNamedParameter($tsfe->sys_language_uid, \PDO::PARAM_INT)
+                    )
+                )
+                ->setMaxResults(1)
+                ->execute()
+                ->fetch();
+            $tsfe->sys_page->versionOL('pages', $row);
+            if (is_array($row)) {
+                $link = (string)$uriBuilder->buildUriFromRoute(
+                    'record_edit',
+                    [
+                        'edit[pages][' . $row['uid'] . ']' => 'edit',
+                        'noView' => 1,
+                        'returnUrl' => $returnUrl
+                    ]
+                );
+                $icon = $this->iconFactory->getIcon('mimetypes-x-content-page-language-overlay', Icon::SIZE_SMALL)->render();
+                $title = $this->extGetLL('edit_editPageOverlay');
+                $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
+                $output[] = '  ' . $icon;
+                $output[] = '</a>';
+            }
+        }
+
+        // Open list view
+        if ($this->getBackendUser()->check('modules', 'web_list')) {
+            $link = (string)$uriBuilder->buildUriFromRoute(
+                'web_list',
+                [
+                    'id' => $id,
+                    'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
+                ]
+            );
+            $icon = $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render();
+            $title = $this->extGetLL('edit_db_list');
+            $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
+            $output[] = '  ' . $icon;
+            $output[] = '</a>';
+        }
+
+        $output[] = '  </div>';
+        $output[] = '</div>';
+        return implode('', $output);
+    }
+
+    /**
+     * Translate given key
+     *
+     * @param string $key Key for a label in the $LOCAL_LANG array of "sysext/lang/Resources/Private/Language/locallang_tsfe.xlf
+     * @param bool $convertWithHtmlspecialchars If TRUE the language-label will be sent through htmlspecialchars
+     * @return string The value for the $key
+     */
+    protected function extGetLL($key, $convertWithHtmlspecialchars = true)
+    {
+        $labelStr = $this->getLanguageService()->getLL($key);
+        if ($convertWithHtmlspecialchars) {
+            $labelStr = htmlspecialchars($labelStr);
+        }
+        return $labelStr;
+    }
+
+    /**
+     * Returns LanguageService
+     *
+     * @return \TYPO3\CMS\Core\Localization\LanguageService
+     */
+    protected function getLanguageService()
+    {
+        return $GLOBALS['LANG'];
+    }
+
+    /**
+     * Returns the current BE user.
+     *
+     * @return \TYPO3\CMS\Backend\FrontendBackendUserAuthentication
+     */
+    protected function getBackendUser()
+    {
+        return $GLOBALS['BE_USER'];
+    }
+
+    /**
+     * @return \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
+     */
+    protected function getTypoScriptFrontendController()
+    {
+        return $GLOBALS['TSFE'];
+    }
+
+    /*****************************************************
+     * Admin Panel: Deprecated API
+     ****************************************************/
+
+    /**
+     * Add an additional stylesheet
+     *
+     * @return string
+     * @deprecated since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)
+     */
+    public function getAdminPanelHeaderData()
+    {
+        trigger_error(
+            'Deprecated since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)',
+            E_USER_DEPRECATED
+        );
+        return $this->getAdminPanelStylesheet();
+    }
+
+    /**
+     * Checks if an Admin Panel section ("module") is available for the user. If so, TRUE is returned.
+     *
+     * @param string $key The module key, eg. "edit", "preview", "info" etc.
+     * @deprecated but still called in FrontendBackendUserAuthentication (will be refactored in a separate step)
+     * @return bool
+     */
+    public function isAdminModuleEnabled($key)
+    {
+        $result = false;
+        // Returns TRUE if the module checked is "preview" and the forcePreview flag is set.
+        if ($key === 'preview' && $this->ext_forcePreview) {
+            $result = true;
+        } elseif (!empty($this->getBackendUser()->extAdminConfig['enable.']['all'])) {
+            $result = true;
+        } elseif (!empty($this->getBackendUser()->extAdminConfig['enable.'][$key])) {
+            $result = true;
+        }
+        return $result;
+    }
+
+    /**
+     * Saves any change in settings made in the Admin Panel.
+     *
+     * @deprecated since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)
+     */
+    public function saveConfigOptions()
+    {
+        trigger_error(
+            'Deprecated since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)',
+            E_USER_DEPRECATED
+        );
+        $this->saveConfiguration();
+    }
+
+    /**
+     * Returns the value for an Admin Panel setting.
+     *
+     * @param string $sectionName Module key
+     * @param string $val Setting key
+     * @return mixed The setting value
+     * @deprecated Since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)
+     */
+    public function extGetFeAdminValue($sectionName, $val = '')
+    {
+        trigger_error(
+            'Deprecated since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)',
+            E_USER_DEPRECATED
+        );
+        if (!$this->isAdminModuleEnabled($sectionName)) {
+            return null;
+        }
+
+        $beUser = $this->getBackendUser();
+        // Exceptions where the values can be overridden (forced) from backend:
+        // deprecated
+        if (
+            $sectionName === 'edit' && (
+                $val === 'displayIcons' && $beUser->extAdminConfig['module.']['edit.']['forceDisplayIcons'] ||
+                $val === 'displayFieldIcons' && $beUser->extAdminConfig['module.']['edit.']['forceDisplayFieldIcons'] ||
+                $val === 'editNoPopup' && $beUser->extAdminConfig['module.']['edit.']['forceNoPopup']
+            )
+        ) {
+            return true;
+        }
+
+        // Override all settings with user TSconfig
+        if ($val && isset($beUser->extAdminConfig['override.'][$sectionName . '.'][$val])) {
+            return $beUser->extAdminConfig['override.'][$sectionName . '.'][$val];
+        }
+        if (!$val && isset($beUser->extAdminConfig['override.'][$sectionName])) {
+            return $beUser->extAdminConfig['override.'][$sectionName];
+        }
+
+        $returnValue = $val ? $beUser->uc['TSFE_adminConfig'][$sectionName . '_' . $val] : 1;
+
+        // Exception for preview
+        if ($sectionName === 'preview' && $this->ext_forcePreview) {
+            return !$val ? true : $returnValue;
+        }
+
+        // See if the menu is expanded!
+        return $this->isAdminModuleOpen($sectionName) ? $returnValue : null;
+    }
+
+    /**
+     * Enables the force preview option.
+     *
+     * @deprecated since TYPO3 v9 - see AdminPanelModule: Preview
+     */
+    public function forcePreview()
+    {
+        trigger_error('Deprecated since TYPO3 v9, see AdminPanelModule: Preview', E_USER_DEPRECATED);
+        $this->ext_forcePreview = true;
+    }
+
+    /**
+     * Returns TRUE if admin panel module is open
+     *
+     * @param string $key Module key
+     * @return bool TRUE, if the admin panel is open for the specified admin panel module key.
+     * @deprecated Since TYPO3 v9 - implement AdminPanelModules via the new API
+     */
+    public function isAdminModuleOpen($key)
+    {
+        trigger_error('since TYPO3 v9 - use new AdminPanel API instead', E_USER_DEPRECATED);
+        return $this->getBackendUser()->uc['TSFE_adminConfig']['display_top'] &&
+               $this->getBackendUser()->uc['TSFE_adminConfig']['display_' . $key];
+    }
+
+    /**
+     * Returns a row (with 4 columns) for content in a section of the Admin Panel.
+     * It will take $pre as a key to a label to display and $element as the content to put into the forth cell.
+     *
+     * @param string $title Key to label
+     * @param string $content The HTML content for the forth table cell.
+     * @param string $checkbox The HTML for a checkbox or hidden fields.
+     * @param string $innerDivClass The Class attribute for the td element.
+     * @param string $outerDivClass The Class attribute for the tr element.
+     * @return string HTML table row.
+     * @see extGetHead()
+     * @deprecated since TYPO3 v9 - use new AdminPanel API instead
+     */
+    public function extGetItem($title, $content = '', $checkbox = '', $outerDivClass = null, $innerDivClass = null)
+    {
+        trigger_error('since TYPO3 v9 - use new AdminPanel API instead', E_USER_DEPRECATED);
+        $title = $title ? '<label for="' . htmlspecialchars($title) . '">' . $this->extGetLL($title) . '</label>' : '';
+        $out = '';
+        $out .= (string)$outerDivClass ? '<div class="' . htmlspecialchars($outerDivClass) . '">' : '<div>';
+        $out .= (string)$innerDivClass ? '<div class="' . htmlspecialchars($innerDivClass) . '">' : '<div>';
+        $out .= $checkbox . $title . $content . '</div></div>';
+        return $out;
+    }
+
+    /**
+     * Returns a row (with colspan=4) which is a header for a section in the Admin Panel.
+     * It will have a plus/minus icon and a label which is linked so that it submits the form which surrounds the whole Admin Panel when clicked, alterting the TSFE_ADMIN_PANEL[display_' . $pre . '] value
+     * See the functions get*Module
+     *
+     * @param string $sectionSuffix The suffix to the display_ label. Also selects the label from the LOCAL_LANG array.
+     * @return string HTML table row.
+     * @see extGetItem()
+     * @deprecated since TYPO3 v9 - use new AdminPanel API instead
+     */
+    public function extGetHead($sectionSuffix)
+    {
+        trigger_error('since TYPO3 v9 - use new AdminPanel API instead', E_USER_DEPRECATED);
+        return $this->linkSectionHeader($sectionSuffix, $this->extGetLL($sectionSuffix));
+    }
+
+    /**
+     * Wraps a string in a link which will open/close a certain part of the Admin Panel
+     *
+     * @param string $sectionSuffix The code for the display_ label/key
+     * @param string $sectionTitle Title (HTML-escaped)
+     * @param string $className The classname for the <a> tag
+     * @return string $className Linked input string
+     * @see extGetHead()
+     * @deprecated  since TYPO3 v9 - use new AdminPanel API instead
+     */
+    public function linkSectionHeader($sectionSuffix, $sectionTitle, $className = '')
+    {
+        trigger_error('since TYPO3 v9 - use new AdminPanel API instead', E_USER_DEPRECATED);
+        $onclick = 'document.TSFE_ADMIN_PANEL_FORM[' .
+                   GeneralUtility::quoteJSvalue('TSFE_ADMIN_PANEL[display_' . $sectionSuffix . ']') .
+                   '].value=' .
+                   ($this->getBackendUser()->uc['TSFE_adminConfig']['display_' . $sectionSuffix] ? '0' : '1') .
+                   ';document.TSFE_ADMIN_PANEL_FORM.submit();return false;';
+
+        $output = [];
+        $output[] = '<span class="typo3-adminPanel-section-title-identifier"></span>';
+        $output[] = '<a href="javascript:void(0)" onclick="' . htmlspecialchars($onclick) . '">';
+        $output[] = '  ' . $sectionTitle;
+        $output[] = '</a>';
+        $output[] = '<input type="hidden" name="TSFE_ADMIN_PANEL[display_' .
+                    $sectionSuffix .
+                    ']" value="' .
+                    (int)$this->isAdminModuleOpen($sectionSuffix) .
+                    '" />';
+
+        return implode('', $output);
+    }
+}
diff --git a/typo3/sysext/adminpanel/Classes/View/AdminPanelViewHookInterface.php b/typo3/sysext/adminpanel/Classes/View/AdminPanelViewHookInterface.php
new file mode 100644 (file)
index 0000000..4f4bbf7
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+namespace TYPO3\CMS\Adminpanel\View;
+
+/*
+ * 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!
+ */
+
+/**
+ * Interface for classes which hook into AdminPanelView
+ *
+ * @deprecated since v9 will be removed in v10 - see AdminPanelModuleInterface
+ */
+interface AdminPanelViewHookInterface
+{
+    /**
+     * Extend the adminPanel
+     *
+     * @param string $moduleContent Content of the admin panel
+     * @param \TYPO3\CMS\Adminpanel\View\AdminPanelView $obj The adminPanel object
+     * @return string Returns content of admin panel
+     */
+    public function extendAdminPanel($moduleContent, AdminPanelView $obj);
+}
diff --git a/typo3/sysext/adminpanel/LICENSE.txt b/typo3/sysext/adminpanel/LICENSE.txt
new file mode 100644 (file)
index 0000000..95d36a7
--- /dev/null
@@ -0,0 +1,345 @@
+Some icons used in the TYPO3 project are retrieved from the "Silk" icon set of
+Mark James, which can be found at http://famfamfam.com/lab/icons/silk/. This
+set is distributed under a Creative Commons Attribution 2.5 License. The
+license can be found at http://creativecommons.org/licenses/by/2.5/.
+---------------------------------
+
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program 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.
+
+    This program 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.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/typo3/sysext/adminpanel/Migrations/Code/ClassAliasMap.php b/typo3/sysext/adminpanel/Migrations/Code/ClassAliasMap.php
new file mode 100644 (file)
index 0000000..ef992c1
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+return [
+    'TYPO3\\CMS\\Frontend\\View\\AdminPanelView' => \TYPO3\CMS\Adminpanel\View\AdminPanelView::class,
+    'TYPO3\\CMS\\Frontend\\View\\AdminPanelViewHookInterface' => \TYPO3\CMS\Adminpanel\View\AdminPanelViewHookInterface::class
+];
diff --git a/typo3/sysext/adminpanel/Migrations/Code/LegacyClassesForIde.php b/typo3/sysext/adminpanel/Migrations/Code/LegacyClassesForIde.php
new file mode 100644 (file)
index 0000000..c067ba5
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+namespace {
+    die('Access denied');
+}
+
+namespace TYPO3\CMS\Frontend\View {
+    class AdminPanelView extends \TYPO3\CMS\Adminpanel\View\AdminPanelView
+    {
+    }
+    interface AdminPanelViewHookInterface extends \TYPO3\CMS\Adminpanel\View\AdminPanelViewHookInterface
+    {
+    }
+}
diff --git a/typo3/sysext/adminpanel/Resources/Public/Css/adminpanel.css b/typo3/sysext/adminpanel/Resources/Public/Css/adminpanel.css
new file mode 100644 (file)
index 0000000..35818bd
--- /dev/null
@@ -0,0 +1,13 @@
+/*!
+ * 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!
+ */
+#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon,.typo3-editPanel-btn .icon,.typo3-editPanel-link .icon{position:relative;display:inline-block;overflow:hidden;white-space:nowrap;vertical-align:-22%}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon img,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon svg,.typo3-editPanel-btn .icon img,.typo3-editPanel-btn .icon svg,.typo3-editPanel-link .icon img,.typo3-editPanel-link .icon svg{display:block;height:100%;width:100%;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon *,.typo3-editPanel-btn .icon *,.typo3-editPanel-link .icon *{display:block;line-height:inherit}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-markup,.typo3-editPanel-btn .icon-markup,.typo3-editPanel-link .icon-markup{position:absolute;display:block;text-align:center;top:0;left:0;right:0;bottom:0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-overlay,.typo3-editPanel-btn .icon-overlay,.typo3-editPanel-link .icon-overlay{position:absolute;bottom:0;right:0;height:68.75%;width:68.75%;text-align:center}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-color,.typo3-editPanel-btn .icon-color,.typo3-editPanel-link .icon-color{fill:currentColor}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-spin .icon-markup,.typo3-editPanel-btn .icon-spin .icon-markup,.typo3-editPanel-link .icon-spin .icon-markup{-webkit-animation:icon-spin 2s infinite linear;animation:icon-spin 2s infinite linear}@-webkit-keyframes icon-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes icon-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-state-disabled .icon-markup,.typo3-editPanel-btn .icon-state-disabled .icon-markup,.typo3-editPanel-link .icon-state-disabled .icon-markup{opacity:.5}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-small,.typo3-editPanel-btn .icon-size-small,.typo3-editPanel-link .icon-size-small{height:16px;width:16px;line-height:16px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-small .icon-unify,.typo3-editPanel-btn .icon-size-small .icon-unify,.typo3-editPanel-link .icon-size-small .icon-unify{line-height:16px;font-size:14px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-small .icon-overlay .icon-unify,.typo3-editPanel-btn .icon-size-small .icon-overlay .icon-unify,.typo3-editPanel-link .icon-size-small .icon-overlay .icon-unify{line-height:10px;font-size:9px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-default,.typo3-editPanel-btn .icon-size-default,.typo3-editPanel-link .icon-size-default{height:32px;width:32px;line-height:32px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-default .icon-unify,.typo3-editPanel-btn .icon-size-default .icon-unify,.typo3-editPanel-link .icon-size-default .icon-unify{line-height:32px;font-size:28px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-default .icon-overlay .icon-unify,.typo3-editPanel-btn .icon-size-default .icon-overlay .icon-unify,.typo3-editPanel-link .icon-size-default .icon-overlay .icon-unify{line-height:20px;font-size:18px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-large,.typo3-editPanel-btn .icon-size-large,.typo3-editPanel-link .icon-size-large{height:48px;width:48px;line-height:48px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-large .icon-unify,.typo3-editPanel-btn .icon-size-large .icon-unify,.typo3-editPanel-link .icon-size-large .icon-unify{line-height:48px;font-size:42px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-large .icon-overlay .icon-unify,.typo3-editPanel-btn .icon-size-large .icon-overlay .icon-unify,.typo3-editPanel-link .icon-size-large .icon-overlay .icon-unify{line-height:30px;font-size:26px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-actions-edit-copy-release,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-actions-edit-cut-release,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-dialog-error,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-current,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-permission-denied,.typo3-editPanel-btn .icon-actions-edit-copy-release,.typo3-editPanel-btn .icon-actions-edit-cut-release,.typo3-editPanel-btn .icon-status-dialog-error,.typo3-editPanel-btn .icon-status-status-current,.typo3-editPanel-btn .icon-status-status-permission-denied,.typo3-editPanel-link .icon-actions-edit-copy-release,.typo3-editPanel-link .icon-actions-edit-cut-release,.typo3-editPanel-link .icon-status-dialog-error,.typo3-editPanel-link .icon-status-status-current,.typo3-editPanel-link .icon-status-status-permission-denied{color:#c83c3c}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-sorting-light-asc,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-sorting-light-desc,.typo3-editPanel-btn .icon-status-status-sorting-light-asc,.typo3-editPanel-btn .icon-status-status-sorting-light-desc,.typo3-editPanel-link .icon-status-status-sorting-light-asc,.typo3-editPanel-link .icon-status-status-sorting-light-desc{color:#fff}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-sorting-asc,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-sorting-desc,.typo3-editPanel-btn .icon-status-status-sorting-asc,.typo3-editPanel-btn .icon-status-status-sorting-desc,.typo3-editPanel-link .icon-status-status-sorting-asc,.typo3-editPanel-link .icon-status-status-sorting-desc{color:#737373}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-dialog-information,.typo3-editPanel-btn .icon-status-dialog-information,.typo3-editPanel-link .icon-status-dialog-information{color:#6daae0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-dialog-ok,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-permission-granted,.typo3-editPanel-btn .icon-status-dialog-ok,.typo3-editPanel-btn .icon-status-status-permission-granted,.typo3-editPanel-link .icon-status-dialog-ok,.typo3-editPanel-link .icon-status-status-permission-granted{color:#79a548}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-dialog-notification,.typo3-editPanel-btn .icon-status-dialog-notification,.typo3-editPanel-link .icon-status-dialog-notification{color:#333}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-dialog-warning,.typo3-editPanel-btn .icon-status-dialog-warning,.typo3-editPanel-link .icon-status-dialog-warning{color:#e8a33d}@font-face{font-family:TYPO3FontAwesome;src:url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.eot?v=4.6.3);src:url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.eot?#iefix&v=4.6.3) format("embedded-opentype"),url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.woff2?v=4.6.3) format("woff2"),url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.woff?v=4.6.3) format("woff"),url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.ttf?v=4.6.3) format("truetype"),url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular) format("svg");font-weight:400;font-style:normal}#TSFE_ADMIN_PANEL_FORM .fa:before,.typo3-editPanel .fa:before,.typo3-feedit-element .fa:before{display:inline-block;font:normal normal normal 14px/1 TYPO3FontAwesome;font-size:15px;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translate(0,0);transform:translate(0,0)}#TSFE_ADMIN_PANEL_FORM .fa-pencil:before,.typo3-editPanel .fa-pencil:before,.typo3-feedit-element .fa-pencil:before{content:"\f040"}#TSFE_ADMIN_PANEL_FORM .fa-angle-up:before,.typo3-editPanel .fa-angle-up:before,.typo3-feedit-element .fa-angle-up:before{content:"\f106"}#TSFE_ADMIN_PANEL_FORM .fa-angle-down:before,.typo3-editPanel .fa-angle-down:before,.typo3-feedit-element .fa-angle-down:before{content:"\f107"}#TSFE_ADMIN_PANEL_FORM .fa-toggle-off:before,.typo3-editPanel .fa-toggle-off:before,.typo3-feedit-element .fa-toggle-off:before{content:"\f204"}#TSFE_ADMIN_PANEL_FORM .fa-toggle-on:before,.typo3-editPanel .fa-toggle-on:before,.typo3-feedit-element .fa-toggle-on:before{content:"\f205"}#TSFE_ADMIN_PANEL_FORM .fa-google-plus-square:before,.typo3-editPanel .fa-google-plus-square:before,.typo3-feedit-element .fa-google-plus-square:before{content:"\f0d4"}#TSFE_ADMIN_PANEL_FORM .fa-trash:before,.typo3-editPanel .fa-trash:before,.typo3-feedit-element .fa-trash:before{content:"\f1f8"}#TSFE_ADMIN_PANEL_FORM .fa-history:before,.typo3-editPanel .fa-history:before,.typo3-feedit-element .fa-history:before{content:"\f1da"}#TSFE_ADMIN_PANEL_FORM .fa-list-alt:before,.typo3-editPanel .fa-list-alt:before,.typo3-feedit-element .fa-list-alt:before{content:"\f022"}#TSFE_ADMIN_PANEL_FORM .fa-plus-square:before,.typo3-editPanel .fa-plus-square:before,.typo3-feedit-element .fa-plus-square:before{content:"\f0fe"}#TSFE_ADMIN_PANEL_FORM .fa-arrows:before,.typo3-editPanel .fa-arrows:before,.typo3-feedit-element .fa-arrows:before{content:"\f047"}#TSFE_ADMIN_PANEL_FORM .fa-exclamation-circle:before,.typo3-editPanel .fa-exclamation-circle:before,.typo3-feedit-element .fa-exclamation-circle:before{content:"\f06a"}#TSFE_ADMIN_PANEL_FORM .fa-exclamation-triangle:before,.typo3-editPanel .fa-exclamation-triangle:before,.typo3-feedit-element .fa-exclamation-triangle:before{content:"\f071"}#TSFE_ADMIN_PANEL_FORM .fa-info-circle:before,.typo3-editPanel .fa-info-circle:before,.typo3-feedit-element .fa-info-circle:before{content:"\f05a"}#TSFE_ADMIN_PANEL_FORM .fa-caret-down:before,.typo3-editPanel .fa-caret-down:before,.typo3-feedit-element .fa-caret-down:before{content:"\f0d7"}#TSFE_ADMIN_PANEL_FORM .fa-caret-up:before,.typo3-editPanel .fa-caret-up:before,.typo3-feedit-element .fa-caret-up:before{content:"\f0d8"}#TSFE_ADMIN_PANEL_FORM .fa-bolt:before,.typo3-editPanel .fa-bolt:before,.typo3-feedit-element .fa-bolt:before{content:"\f0e7"}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title-identifier:before{display:inline-block;font:normal normal normal 14px/1 TYPO3FontAwesome;font-size:15px;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translate(0,0);transform:translate(0,0)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel,.typo3-editPanel{background-color:#fafafa;color:#333;font-family:sans-serif;font-size:12px;line-height:1.35em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel a,.typo3-editPanel a{color:inherit;text-decoration:none}#TSFE_ADMIN_PANEL_FORM{display:block!important;position:fixed;bottom:0;left:0;max-width:100%;max-height:100%;z-index:10002;padding:0;margin:0}#TSFE_ADMIN_PANEL_FORM *{box-sizing:border-box}#TSFE_ADMIN_PANEL_FORM *,#TSFE_ADMIN_PANEL_FORM :active,#TSFE_ADMIN_PANEL_FORM :focus,#TSFE_ADMIN_PANEL_FORM :hover{outline:0}#TSFE_ADMIN_PANEL_FORM :after,#TSFE_ADMIN_PANEL_FORM :before{box-sizing:border-box}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel{border:1px solid #cacaca;max-height:100vh;max-width:100%;min-width:280px;border-left:0;border-bottom:0;border-top-left-radius:2px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelCollapse,#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelEnable{display:none}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelEnable:checked+#typo3AdminPanelCollapse+.typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-enable-enabled{display:inline}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelEnable:checked+#typo3AdminPanelCollapse+.typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-enable-disabled{display:none}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelEnable:checked+#typo3AdminPanelCollapse+.typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse{display:block}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelCollapse:checked+.typo3-adminPanel .typo3-adminPanel-actions,#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelCollapse:checked+.typo3-adminPanel .typo3-adminPanel-body{display:none}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelCollapse:checked+.typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse-enabled{display:inline}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelCollapse:checked+.typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse-disabled{display:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header{position:relative;background-color:#333;color:#fafafa;padding:1em 3em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-user:before{content:':';margin-right:.5em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-enable{position:absolute;cursor:pointer;top:50%;left:0;padding:1em;-webkit-transform:translate(0,-50%);transform:translate(0,-50%)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse{display:none;left:auto;right:0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-enable-enabled{display:none;color:#79a548}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-enable-disabled{color:#c83c3c}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse-enabled{display:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-actions{text-align:right;padding:0 1em .75em;background-color:#333;color:#fafafa}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-body{height:100%;overflow:auto}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-body>.typo3-adminPanel-section-title:first-child{border-top:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title{position:relative;overflow:hidden;border-top:1px solid #bbb;background-color:#eee;padding:.75em 3em .75em 1em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title:hover{background-color:#ddd}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title a{position:relative;display:block;padding:.75em 3em .75em 1em;margin:-.75em -3em -.75em -1em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title-identifier{position:absolute;top:50%;right:0;padding:1em;-webkit-transform:translate(0,-50%);transform:translate(0,-50%)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title-identifier:before{content:"\f105"}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-open .typo3-adminPanel-section-title-identifier:before{content:"\f107 "}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-body{padding:.75em 1em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel label{display:block;font-weight:400;padding:0;margin:0;overflow:hidden}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel input[type=text],#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel select{display:block;width:100%;padding:.5em;border:1px solid #ccc;margin:.5em 0;font-size:inherit}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel input[type=text]:focus,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel input[type=text]:hover,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel select:focus,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel select:hover{border-color:#aaa}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group{margin:1em 0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-checkbox,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-radio{margin:.5em 0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-checkbox label,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-radio label{padding-left:20px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-checkbox input[type=checkbox],#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-checkbox input[type=radio],#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-radio input[type=checkbox],#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-radio input[type=radio]{float:left;padding:0;margin:1px 0 0 -20px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table-overflow{max-width:100%;margin:1em 0;overflow-x:auto}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table{width:100%;border:1px solid #ccc;border-collapse:collapse;border-spacing:0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table td,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table th{text-align:left;overflow:hidden;position:relative;vertical-align:top;padding:.75em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table thead tr{background-color:rgba(0,0,0,.15)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table thead td,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table thead th{font-weight:400}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table-cell-content{word-wrap:break-word}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table-cell-nowrap{white-space:nowrap}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-logRow-highlight{background-color:#fcd3cf}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .stackPointer{color:maroon;vertical-align:top}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn{display:inline-block;margin-bottom:0;padding:6px 8px;border:1px solid transparent;border-radius:0;font-weight:400;line-height:1.5;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn:active,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn:focus,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn:hover{outline:0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-default{color:#333;background-color:#eee;border-color:#bbb;cursor:pointer}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-default:hover{background-color:#c4c4c4}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-dark{color:#fafafa;background-color:#555;border-color:rgba(0,0,0,.5);cursor:pointer}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-dark:hover{background-color:#444}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-group{position:relative;display:inline-block;vertical-align:middle}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-group .typo3-adminPanel-btn+.typo3-adminPanel-btn{margin-left:-1px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon{display:inline-block;margin-right:2px;padding:0;height:18px;width:16px;white-space:nowrap;overflow:hidden;vertical-align:middle}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon:after,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon:before{position:absolute;content:'';margin-left:7px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon:before{top:0;height:100%;width:2px;margin-left:7px;border-left:1px dotted #666}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon:after{border-top:1px dotted #666;height:2px;width:8px;margin-top:8px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-jointop:before{top:50%}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-joinbottom:before{height:26px;margin-top:-8px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-line:after{display:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-blank{display:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-clear:after,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-clear:before{display:none}.typo3-feedit-element{border:1px solid #cacaca;margin:1em 0}.typo3-editPanel{display:block!important;border-top:1px solid #cacaca;padding:.5em}.typo3-editPanel .typo3-editPanel-label{margin-left:1.5em;display:inline-block;vertical-align:middle}.typo3-editPanel .typo3-adminPanel-btn,.typo3-editPanel .typo3-editPanel-btn{display:inline-block!important;margin-bottom:0;padding:6px 8px;line-height:1.5em;border:1px solid transparent;border-radius:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.typo3-editPanel .typo3-adminPanel-btn:active,.typo3-editPanel .typo3-adminPanel-btn:focus,.typo3-editPanel .typo3-adminPanel-btn:hover,.typo3-editPanel .typo3-editPanel-btn:active,.typo3-editPanel .typo3-editPanel-btn:focus,.typo3-editPanel .typo3-editPanel-btn:hover{outline:0}.typo3-editPanel .typo3-adminPanel-btn-default,.typo3-editPanel .typo3-editPanel-btn-default{color:#333;background-color:#eee;border-color:#bbb;cursor:pointer}.typo3-editPanel .typo3-adminPanel-btn-default:hover,.typo3-editPanel .typo3-editPanel-btn-default:hover{background-color:#c4c4c4}.typo3-editPanel .typo3-adminPanel-form-group,.typo3-editPanel .typo3-editPanel-form-group{margin-right:.5em;display:inline-block}.typo3-editPanel .typo3-adminPanel-btn-group,.typo3-editPanel .typo3-editPanel-btn-group{position:relative;display:inline-block;vertical-align:middle}.typo3-editPanel .typo3-adminPanel-btn-group .typo3-adminPanel-btn+.typo3-adminPanel-btn,.typo3-editPanel .typo3-adminPanel-btn-group .typo3-editPanel-btn+.typo3-editPanel-btn,.typo3-editPanel .typo3-editPanel-btn-group .typo3-adminPanel-btn+.typo3-adminPanel-btn,.typo3-editPanel .typo3-editPanel-btn-group .typo3-editPanel-btn+.typo3-editPanel-btn{margin-left:-1px}.typo3-adminPanel-btn,.typo3-editPanel-btn{display:inline-block!important}.typo3-feedit-element-hidden{border-color:#ebc975}.typo3-feedit-element-hidden .typo3-editPanel{border-top-color:#ebc975;background-color:#f8ecce}.typo3-feedit-element-hidden .typo3-editPanel .typo3-editPanel-btn-default{border-color:#e5b848;background-color:#f2dba1}.typo3-feedit-element-hidden .typo3-editPanel .typo3-editPanel-btn-default:hover{background-color:#eed28b}
\ No newline at end of file
diff --git a/typo3/sysext/adminpanel/Resources/Public/Icons/Extension.png b/typo3/sysext/adminpanel/Resources/Public/Icons/Extension.png
new file mode 100644 (file)
index 0000000..92e2806
Binary files /dev/null and b/typo3/sysext/adminpanel/Resources/Public/Icons/Extension.png differ
diff --git a/typo3/sysext/adminpanel/Resources/Public/Icons/module-adminpanel.svg b/typo3/sysext/adminpanel/Resources/Public/Icons/module-adminpanel.svg
new file mode 100644 (file)
index 0000000..354fa3b
--- /dev/null
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="0" ry="0" fill="#aebb69"/><path fill="#FFF" d="M44.031 40.784l3.441 4.915-2.457 1.721-3.441-4.915 2.457-1.721zm-2.376-.778c-.96.672-2.06.995-3.15.995a5.5 5.5 0 1 1 3.15-.995zm.292-3.898a3.479 3.479 0 0 0-.58-2.615A3.506 3.506 0 0 0 38.496 32a3.48 3.48 0 0 0-2.003.633 3.505 3.505 0 0 0-.86 4.875 3.508 3.508 0 0 0 2.872 1.493 3.48 3.48 0 0 0 2.003-.633 3.477 3.477 0 0 0 1.439-2.26zM48 16v14h-2v-6H18v22h15v2H16V16h32zm-8 2H18v4h22v-4zm6 0h-4v4h4v-4z"/></svg>
\ No newline at end of file
diff --git a/typo3/sysext/adminpanel/Tests/Unit/View/AdminPanelViewTest.php b/typo3/sysext/adminpanel/Tests/Unit/View/AdminPanelViewTest.php
new file mode 100644 (file)
index 0000000..bfd416b
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+declare(strict_types=1);
+
+namespace TYPO3\CMS\Adminpanel\Tests\Unit\View;
+
+/*
+ * 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!
+ */
+
+use TYPO3\CMS\Adminpanel\Tests\Unit\View\Fixtures\AdminPanelDisabledModuleFixture;
+use TYPO3\CMS\Adminpanel\Tests\Unit\View\Fixtures\AdminPanelEnabledShownOnSubmitInitializeModuleFixture;
+use TYPO3\CMS\Adminpanel\View\AdminPanelView;
+use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
+/**
+ * Test case
+ */
+class AdminPanelViewTest extends UnitTestCase
+{
+    public function setUp()
+    {
+        parent::setUp();
+        $iconFactoryProphecy = $this->prophesize(IconFactory::class);
+        GeneralUtility::addInstance(IconFactory::class, $iconFactoryProphecy->reveal());
+        $beUserProphecy = $this->prophesize(BackendUserAuthentication::class);
+        $GLOBALS['BE_USER'] = $beUserProphecy->reveal();
+    }
+
+    /**
+     * @test
+     */
+    public function initializeCallsOnSubmitIfInputVarsAreSet()
+    {
+        $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules'] = [
+            'fixtureOnSubmit' => [
+                'module' => AdminPanelEnabledShownOnSubmitInitializeModuleFixture::class,
+            ],
+        ];
+
+        $postVars = ['preview_showFluidDebug' => '1'];
+        $_GET['TSFE_ADMIN_PANEL'] = $postVars;
+
+        $this->expectExceptionCode('1519997815');
+
+        new AdminPanelView();
+    }
+
+    /**
+     * @test
+     */
+    public function initializeCallsInitializeModulesForEnabledModules()
+    {
+        $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules'] = [
+            'enabledModule' => [
+                'module' => AdminPanelEnabledShownOnSubmitInitializeModuleFixture::class,
+            ],
+            'disabledModule' => [
+                'module' => AdminPanelDisabledModuleFixture::class,
+                'before' => ['enabledModule'],
+            ],
+        ];
+
+        $this->expectExceptionCode(1519999273);
+        new AdminPanelView();
+    }
+}
diff --git a/typo3/sysext/adminpanel/Tests/Unit/View/Fixtures/AdminPanelDisabledModuleFixture.php b/typo3/sysext/adminpanel/Tests/Unit/View/Fixtures/AdminPanelDisabledModuleFixture.php
new file mode 100644 (file)
index 0000000..4c9fffc
--- /dev/null
@@ -0,0 +1,131 @@
+<?php
+declare(strict_types=1);
+namespace TYPO3\CMS\Adminpanel\Tests\Unit\View\Fixtures;
+
+/*
+ * 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!
+ */
+use TYPO3\CMS\Adminpanel\Modules\AdminPanelModuleInterface;
+
+class AdminPanelDisabledModuleFixture implements AdminPanelModuleInterface
+{
+
+    /**
+     * Additional JavaScript code for this module
+     * (you should only use vanilla JS here, as you cannot
+     * rely on the web site providing a specific framework)
+     *
+     * @return string
+     */
+    public function getAdditionalJavaScriptCode(): string
+    {
+        return '';
+    }
+
+    /**
+     * Module content as rendered HTML
+     *
+     * @return string
+     */
+    public function getContent(): string
+    {
+        return '';
+    }
+
+    /**
+     * Identifier for this module,
+     * for example "preview" or "cache"
+     *
+     * @return string
+     */
+    public function getIdentifier(): string
+    {
+        return '';
+    }
+
+    /**
+     * Module label
+     *
+     * @return string
+     */
+    public function getLabel(): string
+    {
+        return '';
+    }
+
+    /**
+     * Initialize the module - runs early in a TYPO3 request
+     */
+    public function initializeModule(): void
+    {
+        throw new \RuntimeException('I should not be initialized.', 1519999375);
+    }
+
+    /**
+     * Module is enabled
+     * -> should be initialized
+     * A module may be enabled but not shown
+     * -> only the initializeModule() method
+     * will be called
+     *
+     * @return bool
+     */
+    public function isEnabled(): bool
+    {
+        return false;
+    }
+
+    /**
+     * Module is open
+     * -> module is enabled
+     * -> module panel is shown and open
+     *
+     * @return bool
+     */
+    public function isOpen(): bool
+    {
+        return true;
+    }
+
+    /**
+     * Module is shown
+     * -> module is enabled
+     * -> module panel should be displayed
+     *
+     * @return bool
+     */
+    public function isShown(): bool
+    {
+        return true;
+    }
+
+    /**
+     * Executed on saving / submit of the configuration form
+     * Can be used to react to changed settings
+     * (for example: clearing a specific cache)
+     *
+     * @param array $input
+     */
+    public function onSubmit(array $input): void
+    {
+    }
+
+    /**
+     * Does this module need a form submit?
+     *
+     * @return bool
+     */
+    public function showFormSubmitButton(): bool
+    {
+        return true;
+    }
+}
diff --git a/typo3/sysext/adminpanel/Tests/Unit/View/Fixtures/AdminPanelEnabledShownOnSubmitInitializeModuleFixture.php b/typo3/sysext/adminpanel/Tests/Unit/View/Fixtures/AdminPanelEnabledShownOnSubmitInitializeModuleFixture.php
new file mode 100644 (file)
index 0000000..8fe133a
--- /dev/null
@@ -0,0 +1,132 @@
+<?php
+declare(strict_types=1);
+namespace TYPO3\CMS\Adminpanel\Tests\Unit\View\Fixtures;
+
+/*
+ * 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!
+ */
+use TYPO3\CMS\Adminpanel\Modules\AdminPanelModuleInterface;
+
+class AdminPanelEnabledShownOnSubmitInitializeModuleFixture implements AdminPanelModuleInterface
+{
+
+    /**
+     * Additional JavaScript code for this module
+     * (you should only use vanilla JS here, as you cannot
+     * rely on the web site providing a specific framework)
+     *
+     * @return string
+     */
+    public function getAdditionalJavaScriptCode(): string
+    {
+        return '';
+    }
+
+    /**
+     * Module content as rendered HTML
+     *
+     * @return string
+     */
+    public function getContent(): string
+    {
+        return '';
+    }
+
+    /**
+     * Identifier for this module,
+     * for example "preview" or "cache"
+     *
+     * @return string
+     */
+    public function getIdentifier(): string
+    {
+        return '';
+    }
+
+    /**
+     * Module label
+     *
+     * @return string
+     */
+    public function getLabel(): string
+    {
+        return '';
+    }
+
+    /**
+     * Initialize the module - runs early in a TYPO3 request
+     */
+    public function initializeModule(): void
+    {
+        throw new \RuntimeException('initialized.', 1519999273);
+    }
+
+    /**
+     * Module is enabled
+     * -> should be initialized
+     * A module may be enabled but not shown
+     * -> only the initializeModule() method
+     * will be called
+     *
+     * @return bool
+     */
+    public function isEnabled(): bool
+    {
+        return true;
+    }
+
+    /**
+     * Module is open
+     * -> module is enabled
+     * -> module panel is shown and open
+     *
+     * @return bool
+     */
+    public function isOpen(): bool
+    {
+        return true;
+    }
+
+    /**
+     * Module is shown
+     * -> module is enabled
+     * -> module panel should be displayed
+     *
+     * @return bool
+     */
+    public function isShown(): bool
+    {
+        return true;
+    }
+
+    /**
+     * Executed on saving / submit of the configuration form
+     * Can be used to react to changed settings
+     * (for example: clearing a specific cache)
+     *
+     * @param array $input
+     */
+    public function onSubmit(array $input): void
+    {
+        throw new \RuntimeException('Catch me if you can!', 1519997815);
+    }
+
+    /**
+     * Does this module need a form submit?
+     *
+     * @return bool
+     */
+    public function showFormSubmitButton(): bool
+    {
+        return true;
+    }
+}
diff --git a/typo3/sysext/adminpanel/composer.json b/typo3/sysext/adminpanel/composer.json
new file mode 100644 (file)
index 0000000..2be3e84
--- /dev/null
@@ -0,0 +1,49 @@
+{
+       "name": "typo3/cms-adminpanel",
+       "type": "typo3-cms-framework",
+       "description": "The TYPO3 admin panel provides a panel with additional functionality in the frontend (Debugging, Caching, Preview...)",
+       "homepage": "https://typo3.org",
+       "license": ["GPL-2.0-or-later"],
+       "authors": [{
+                       "name": "TYPO3 Core Team",
+                       "email": "typo3cms@typo3.org",
+                       "role": "Developer"
+               }],
+
+       "require": {
+               "typo3/cms-core": "9.2.*@dev",
+               "typo3/cms-frontend": "9.2.*@dev"
+       },
+       "conflict": {
+               "typo3/cms": "*"
+       },
+       "replace": {
+               "adminpanel": "*"
+       },
+       "extra": {
+               "branch-alias": {
+                       "dev-master": "9.2.x-dev"
+               },
+               "typo3/cms": {
+                       "Package": {
+                               "partOfFactoryDefault": true
+                       },
+                       "extension-key": "adminpanel"
+               },
+               "typo3/class-alias-loader": {
+                       "class-alias-maps": [
+                               "Migrations/Code/ClassAliasMap.php"
+                       ]
+               }
+       },
+       "autoload": {
+               "psr-4": {
+                       "TYPO3\\CMS\\Adminpanel\\": "Classes/"
+               }
+       },
+       "autoload-dev": {
+               "psr-4": {
+                       "TYPO3\\CMS\\Adminpanel\\Tests\\": "Tests/"
+               }
+       }
+}
diff --git a/typo3/sysext/adminpanel/ext_emconf.php b/typo3/sysext/adminpanel/ext_emconf.php
new file mode 100644 (file)
index 0000000..a0a9916
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+$EM_CONF[$_EXTKEY] = [
+    'title' => 'TYPO3 Admin Panel',
+    'description' => 'The TYPO3 admin panel provides a panel with additional functionality in the frontend (Debugging, Caching, Preview...)',
+    'category' => 'fe',
+    'state' => 'stable',
+    'uploadfolder' => 0,
+    'createDirs' => '',
+    'clearCacheOnLoad' => 1,
+    'author' => 'TYPO3 Core Team',
+    'author_email' => 'typo3cms@typo3.org',
+    'author_company' => '',
+    'version' => '9.2.0',
+    'constraints' => [
+        'depends' => [
+            'typo3' => '9.2.0',
+        ],
+        'conflicts' => [],
+        'suggests' => [],
+    ],
+];
diff --git a/typo3/sysext/adminpanel/ext_localconf.php b/typo3/sysext/adminpanel/ext_localconf.php
new file mode 100644 (file)
index 0000000..0094d2f
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules'] = [
+    'preview' => [
+        'module' => \TYPO3\CMS\Adminpanel\Modules\PreviewModule::class,
+        'before' => ['cache'],
+    ],
+    'cache' => [
+        'module' => \TYPO3\CMS\Adminpanel\Modules\CacheModule::class,
+        'after' => ['preview'],
+    ],
+    'edit' => [
+        'module' => \TYPO3\CMS\Adminpanel\Modules\EditModule::class,
+        'after' => ['cache'],
+    ],
+    'tsdebug' => [
+        'module' => \TYPO3\CMS\Adminpanel\Modules\TsDebugModule::class,
+        'after' => ['edit'],
+    ],
+    'info' => [
+        'module' => \TYPO3\CMS\Adminpanel\Modules\InfoModule::class,
+        'after' => ['tsdebug'],
+    ],
+];
index 33d2b36..cd08742 100644 (file)
@@ -73,7 +73,7 @@ class FrontendBackendUserAuthentication extends BackendUserAuthentication
     public $extAdmEnabled = false;
 
     /**
-     * @var \TYPO3\CMS\Frontend\View\AdminPanelView Instance of admin panel
+     * @var \TYPO3\CMS\Adminpanel\View\AdminPanelView Instance of admin panel
      */
     public $adminPanel = null;
 
@@ -96,7 +96,7 @@ class FrontendBackendUserAuthentication extends BackendUserAuthentication
         if (isset($this->extAdminConfig['enable.'])) {
             foreach ($this->extAdminConfig['enable.'] as $value) {
                 if ($value) {
-                    $this->adminPanel = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\View\AdminPanelView::class);
+                    $this->adminPanel = GeneralUtility::makeInstance(\TYPO3\CMS\Adminpanel\View\AdminPanelView::class);
                     $this->extAdmEnabled = true;
                     break;
                 }
index 6d2ed4a..c3b3a9a 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Core\FrontendEditing;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Adminpanel\View\AdminPanelView;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Query\Restriction\EndTimeRestriction;
 use TYPO3\CMS\Core\Database\Query\Restriction\FrontendGroupRestriction;
@@ -21,7 +22,6 @@ use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction;
 use TYPO3\CMS\Core\Database\Query\Restriction\StartTimeRestriction;
 use TYPO3\CMS\Core\Type\Bitmask\Permission;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Frontend\View\AdminPanelView;
 
 /**
  * Controller class for frontend editing.
index bac629a..60ce4db 100644 (file)
@@ -17,17 +17,17 @@ A new API has been introduced, providing more flexible options to add custom mod
 Impact
 ======
 
-Custom admin panel modules can now be registered via `$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['frontend']['adminPanelModules']`.
+Custom admin panel modules can now be registered via `$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']`.
 
 .. code-block:: php
 
-       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['frontend']['adminPanelModules']['yourmodulename'] = [
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']['yourmodulename'] = [
            'module' => \Vendor\Package\AdminPanel\YourModule::class,
            'after' => ['preview']
        ]
 
-To implement a custom module your module class has to implement the `\TYPO3\CMS\Frontend\AdminPanel\AdminPanelModuleInterface`.
+To implement a custom module your module class has to implement the `\TYPO3\CMS\Adminpanel\Modules\AdminPanelModuleInterface`.
 
-Be aware that the `\TYPO3\CMS\Frontend\AdminPanel\AdminPanelModuleInterface` is not final yet and may change until v9 LTS.
+Be aware that the `\TYPO3\CMS\Adminpanel\Modules\AdminPanelModuleInterface` is not final yet and may change until v9 LTS.
 
 .. index:: Frontend, PHP-API, ext:frontend
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-84159-ExtractAdminPanelToOwnExtension.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-84159-ExtractAdminPanelToOwnExtension.rst
new file mode 100644 (file)
index 0000000..19d7236
--- /dev/null
@@ -0,0 +1,20 @@
+.. include:: ../../Includes.txt
+
+======================================================
+Feature: #84159 - Extract admin panel to own extension
+======================================================
+
+See :issue:`84159`
+
+Description
+===========
+
+The admin panel was extracted to a standalone extension. All admin panel specific code will be moved to the extension removing cross-dependencies and enabling better scoping.
+
+
+Impact
+======
+
+The admin panel can be completely uninstalled by deactivating the extension. To use the admin panel functionality the extension has to be activated. Classes have been moved to the new extension and a class alias map for migration of legacy code has been provided.
+
+.. index:: Frontend, PHP-API, ext:frontend
\ No newline at end of file
index 6d83e5d..54addc2 100644 (file)
@@ -13,6 +13,7 @@ namespace TYPO3\CMS\Feedit;
  *
  * The TYPO3 project - inspiring people to share!
  */
+use TYPO3\CMS\Adminpanel\View\AdminPanelView;
 use TYPO3\CMS\Backend\FrontendBackendUserAuthentication;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
@@ -21,7 +22,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
-use TYPO3\CMS\Frontend\View\AdminPanelView;
 
 /**
  * View class for the edit panels in frontend editing.
diff --git a/typo3/sysext/frontend/Classes/AdminPanel/AbstractModule.php b/typo3/sysext/frontend/Classes/AdminPanel/AbstractModule.php
deleted file mode 100644 (file)
index 5987fc2..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace TYPO3\CMS\Frontend\AdminPanel;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Backend\FrontendBackendUserAuthentication;
-use TYPO3\CMS\Core\Localization\LanguageService;
-
-/**
- * Abstract base class for Core Admin Panel Modules containing helper methods
- *
- * @internal
- */
-abstract class AbstractModule implements AdminPanelModuleInterface
-{
-
-    /**
-     * @inheritdoc
-     */
-    public function getAdditionalJavaScriptCode(): string
-    {
-        return '';
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function initializeModule(): void
-    {
-    }
-
-    /**
-     * Returns true if the module is
-     * -> either enabled via tsconfig admPanel.enable
-     * -> or any setting is overridden
-     * override is a way to use functionality of the admin panel without displaying the admin panel to users
-     * for example: hidden records or pages can be displayed by default
-     *
-     * @return bool
-     */
-    public function isEnabled(): bool
-    {
-        $identifier = $this->getIdentifier();
-        $result = $this->isEnabledViaTsConfig();
-        if ($this->getBackendUser()->extAdminConfig['override.'][$identifier] ?? false) {
-            $result = (bool)$this->getBackendUser()->extAdminConfig['override.'][$identifier];
-        }
-        return $result;
-    }
-
-    /**
-     * Uses the backend user session to determine if the module is open
-     *
-     * @return bool
-     */
-    public function isOpen(): bool
-    {
-        $option = 'display_' . $this->getIdentifier();
-        return isset($this->getBackendUser()->uc['TSFE_adminConfig'][$option])
-            ? (bool)$this->getBackendUser()->uc['TSFE_adminConfig'][$option]
-            : false;
-    }
-
-    /**
-     * Determines if the panel for this module is shown
-     * -> returns true if panel is enabled in TSConfig
-     *
-     * @see isEnabled()
-     * @return bool
-     */
-    public function isShown(): bool
-    {
-        return $this->isEnabledViaTsConfig();
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function onSubmit(array $input): void
-    {
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function showFormSubmitButton(): bool
-    {
-        return false;
-    }
-
-    /**
-     * Translate given key
-     *
-     * @param string $key Key for a label in the $LOCAL_LANG array of "sysext/lang/Resources/Private/Language/locallang_tsfe.xlf
-     * @param bool $convertWithHtmlspecialchars If TRUE the language-label will be sent through htmlspecialchars
-     * @return string The value for the $key
-     */
-    protected function extGetLL($key, $convertWithHtmlspecialchars = true): string
-    {
-        $labelStr = $this->getLanguageService()->getLL($key);
-        if ($convertWithHtmlspecialchars) {
-            $labelStr = htmlspecialchars($labelStr);
-        }
-        return $labelStr;
-    }
-
-    /**
-     * Returns the current BE user.
-     *
-     * @return \TYPO3\CMS\Backend\FrontendBackendUserAuthentication
-     */
-    protected function getBackendUser(): FrontendBackendUserAuthentication
-    {
-        return $GLOBALS['BE_USER'];
-    }
-
-    /**
-     * Helper method to return configuration options
-     * Checks User TSConfig overrides and current backend user session
-     *
-     * @param string $option
-     * @return string
-     */
-    protected function getConfigurationOption(string $option): string
-    {
-        $beUser = $this->getBackendUser();
-        $identifier = $this->getIdentifier();
-
-        if ($option && isset($beUser->extAdminConfig['override.'][$identifier . '.'][$option])) {
-            $returnValue = $beUser->extAdminConfig['override.'][$identifier . '.'][$option];
-        } else {
-            $returnValue = $beUser->uc['TSFE_adminConfig'][$identifier . '_' . $option] ?? '';
-        }
-
-        return (string)$returnValue;
-    }
-
-    /**
-     * Returns LanguageService
-     *
-     * @return \TYPO3\CMS\Core\Localization\LanguageService
-     */
-    protected function getLanguageService(): LanguageService
-    {
-        return $GLOBALS['LANG'];
-    }
-
-    /**
-     * Returns true if TSConfig admPanel.enable is set for this module (or all modules)
-     *
-     * @return bool
-     */
-    protected function isEnabledViaTsConfig(): bool
-    {
-        $result = false;
-        $identifier = $this->getIdentifier();
-        if (!empty($this->getBackendUser()->extAdminConfig['enable.']['all'])) {
-            $result = true;
-        } elseif (!empty($this->getBackendUser()->extAdminConfig['enable.'][$identifier])) {
-            $result = true;
-        }
-        return $result;
-    }
-}
diff --git a/typo3/sysext/frontend/Classes/AdminPanel/AdminPanelModuleInterface.php b/typo3/sysext/frontend/Classes/AdminPanel/AdminPanelModuleInterface.php
deleted file mode 100644 (file)
index 886b3c7..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace TYPO3\CMS\Frontend\AdminPanel;
-
-/*
- * 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!
- */
-
-/**
- * Interface for admin panel modules registered via EXTCONF
- *
- * @internal until API is stable
- */
-interface AdminPanelModuleInterface
-{
-    /**
-     * Additional JavaScript code for this module
-     * (you should only use vanilla JS here, as you cannot
-     * rely on the web site providing a specific framework)
-     *
-     * @return string
-     */
-    public function getAdditionalJavaScriptCode(): string;
-
-    /**
-     * Module content as rendered HTML
-     *
-     * @return string
-     */
-    public function getContent(): string;
-
-    /**
-     * Identifier for this module,
-     * for example "preview" or "cache"
-     *
-     * @return string
-     */
-    public function getIdentifier(): string;
-
-    /**
-     * Module label
-     *
-     * @return string
-     */
-    public function getLabel(): string;
-
-    /**
-     * Initialize the module - runs early in a TYPO3 request
-     */
-    public function initializeModule(): void;
-
-    /**
-     * Module is enabled
-     * -> should be initialized
-     * A module may be enabled but not shown
-     * -> only the initializeModule() method
-     * will be called
-     *
-     * @return bool
-     */
-    public function isEnabled(): bool;
-
-    /**
-     * Module is open
-     * -> module is enabled
-     * -> module panel is shown and open
-     *
-     * @return bool
-     */
-    public function isOpen(): bool;
-
-    /**
-     * Module is shown
-     * -> module is enabled
-     * -> module panel should be displayed
-     *
-     * @return bool
-     */
-    public function isShown(): bool;
-
-    /**
-     * Executed on saving / submit of the configuration form
-     * Can be used to react to changed settings
-     * (for example: clearing a specific cache)
-     *
-     * @param array $input
-     */
-    public function onSubmit(array $input): void;
-
-    /**
-     * Does this module need a form submit?
-     *
-     * @return bool
-     */
-    public function showFormSubmitButton(): bool;
-}
diff --git a/typo3/sysext/frontend/Classes/AdminPanel/CacheModule.php b/typo3/sysext/frontend/Classes/AdminPanel/CacheModule.php
deleted file mode 100644 (file)
index fd7a6de..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace TYPO3\CMS\Frontend\AdminPanel;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Type\Bitmask\Permission;
-use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
-
-class CacheModule extends AbstractModule
-{
-
-    /**
-     * Creates the content for the "cache" section ("module") of the Admin Panel
-     *
-     * @return string HTML content for the section. Consists of a string with table-rows with four columns.
-     */
-    public function getContent(): string
-    {
-        $output = [];
-        if ($this->getBackendUser()->uc['TSFE_adminConfig']['display_cache']) {
-            $output[] = '<div class="typo3-adminPanel-form-group">';
-            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[cache_noCache]" value="0" />';
-            $output[] = '    <label for="cache_noCache">';
-            $output[] = '      <input type="checkbox" id="cache_noCache" name="TSFE_ADMIN_PANEL[cache_noCache]" value="1"' .
-                        ($this->getBackendUser()->uc['TSFE_adminConfig']['cache_noCache'] ? ' checked="checked"' : '') .
-                        ' />';
-            $output[] = '      ' . $this->extGetLL('cache_noCache');
-            $output[] = '    </label>';
-            $output[] = '  </div>';
-            $output[] = '</div>';
-
-            $levels = $this->getBackendUser()->uc['TSFE_adminConfig']['cache_clearCacheLevels'];
-            $output[] = '<div class="typo3-adminPanel-form-group">';
-            $output[] = '  <label for="cache_clearCacheLevels">';
-            $output[] = '    ' . $this->extGetLL('cache_clearLevels');
-            $output[] = '  </label>';
-            $output[] = '  <select id="cache_clearCacheLevels" name="TSFE_ADMIN_PANEL[cache_clearCacheLevels]">';
-            $output[] = '    <option value="0"' . ((int)$levels === 0 ? ' selected="selected"' : '') . '>';
-            $output[] = '      ' . $this->extGetLL('div_Levels_0');
-            $output[] = '    </option>';
-            $output[] = '    <option value="1"' . ($levels == 1 ? ' selected="selected"' : '') . '>';
-            $output[] = '      ' . $this->extGetLL('div_Levels_1');
-            $output[] = '    </option>';
-            $output[] = '    <option value="2"' . ($levels == 2 ? ' selected="selected"' : '') . '>';
-            $output[] = '      ' . $this->extGetLL('div_Levels_2');
-            $output[] = '    </option>';
-            $output[] = '  </select>';
-            $output[] = '</div>';
-
-            $output[] = '<div class="typo3-adminPanel-form-group">';
-            $output[] = '  <input type="hidden" name="TSFE_ADMIN_PANEL[cache_clearCacheId]" value="' .
-                        $GLOBALS['TSFE']->id .
-                        '" />';
-            $output[] = '  <input class="typo3-adminPanel-btn typo3-adminPanel-btn-default" type="submit" value="' .
-                        $this->extGetLL('update') .
-                        '" />';
-            $output[] = '</div>';
-            $output[] = '<div class="typo3-adminPanel-form-group">';
-            $output[] = '  <input class="typo3-adminPanel-btn typo3-adminPanel-btn-default" type="submit" name="TSFE_ADMIN_PANEL[action][clearCache]" value="' .
-                        $this->extGetLL('cache_doit') .
-                        '" />';
-            $output[] = '</div>';
-        }
-        return implode('', $output);
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getIdentifier(): string
-    {
-        return 'cache';
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getLabel(): string
-    {
-        return $this->extGetLL('cache');
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function initializeModule(): void
-    {
-        if ($this->getConfigurationOption('noCache')) {
-            $this->getTypoScriptFrontendController()->set_no_cache('Admin Panel: No Caching', true);
-        }
-    }
-
-    /**
-     * Clear cache on saving if requested
-     *
-     * @param array $input
-     */
-    public function onSubmit(array $input): void
-    {
-        if (($input['action']['clearCache'] ?? false) ||
-            isset($input['preview_showFluidDebug'])) {
-            $theStartId = (int)$input['cache_clearCacheId'];
-            $this->getTypoScriptFrontendController()
-                ->clearPageCacheContent_pidList(
-                    $this->getBackendUser()->extGetTreeList(
-                        $theStartId,
-                        (int)$this->getConfigurationOption('clearCacheLevels'),
-                        0,
-                        $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW)
-                    ) . $theStartId
-                );
-        }
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function showFormSubmitButton(): bool
-    {
-        return true;
-    }
-
-    /**
-     * @return TypoScriptFrontendController
-     */
-    protected function getTypoScriptFrontendController(): TypoScriptFrontendController
-    {
-        return $GLOBALS['TSFE'];
-    }
-}
diff --git a/typo3/sysext/frontend/Classes/AdminPanel/EditModule.php b/typo3/sysext/frontend/Classes/AdminPanel/EditModule.php
deleted file mode 100644 (file)
index bb5e62b..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace TYPO3\CMS\Frontend\AdminPanel;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
-
-/**
- * Admin Panel Edit Module
- */
-class EditModule extends AbstractModule
-{
-    /**
-     * Creates the content for the "edit" section ("module") of the Admin Panel
-     *
-     * @return string HTML content for the section. Consists of a string with table-rows with four columns.
-     */
-    public function getContent(): string
-    {
-        $output = [];
-        if ($this->getBackendUser()->uc['TSFE_adminConfig']['display_edit']) {
-
-            // If another page module was specified, replace the default Page module with the new one
-            $newPageModule = trim((string)$this->getBackendUser()->getTSConfigVal('options.overridePageModule'));
-            $pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
-
-            if (ExtensionManagementUtility::isLoaded('feedit')) {
-                $output[] = '<div class="typo3-adminPanel-form-group">';
-                $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-                $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[edit_displayFieldIcons]" value="0" />';
-                $output[] = '    <label for="edit_displayFieldIcons">';
-                $output[] = '      <input type="checkbox" id="edit_displayFieldIcons" name="TSFE_ADMIN_PANEL[edit_displayFieldIcons]" value="1"' .
-                            ($this->getBackendUser(
-                            )->uc['TSFE_adminConfig']['edit_displayFieldIcons'] ? ' checked="checked"' : '') .
-                            ' />';
-                $output[] = '      ' . $this->extGetLL('edit_displayFieldIcons');
-                $output[] = '    </label>';
-                $output[] = '  </div>';
-                $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-                $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[edit_displayIcons]" value="0" />';
-                $output[] = '    <label for="edit_displayIcons">';
-                $output[] = '      <input type="checkbox" id="edit_displayIcons" name="TSFE_ADMIN_PANEL[edit_displayIcons]" value="1"' .
-                            ($this->getBackendUser(
-                            )->uc['TSFE_adminConfig']['edit_displayIcons'] ? ' checked="checked"' : '') .
-                            ' />';
-                $output[] = '      ' . $this->extGetLL('edit_displayIcons');
-                $output[] = '    </label>';
-                $output[] = '  </div>';
-                $output[] = '</div>';
-            }
-
-            $output[] = $this->getBackendUser()->adminPanel->ext_makeToolBar();
-
-            $onClick = '
-                if (parent.opener && parent.opener.top && parent.opener.top.TS) {
-                    parent.opener.top.fsMod.recentIds["web"]=' .
-                       (int)$this->getTypoScriptFrontendController()->page['uid'] .
-                       ';
-                    if (parent.opener.top && parent.opener.top.nav_frame && parent.opener.top.nav_frame.refresh_nav) {
-                        parent.opener.top.nav_frame.refresh_nav();
-                    }
-                    parent.opener.top.goToModule("' .
-                       $pageModule .
-                       '");
-                    parent.opener.top.focus();
-                } else {
-                    vHWin=window.open(' .
-                       GeneralUtility::quoteJSvalue(BackendUtility::getBackendScript()) .
-                       ',\'' .
-                       md5('Typo3Backend-' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) .
-                       '\');
-                    vHWin.focus();
-                }
-                return false;
-            ';
-            $output[] = '<div class="typo3-adminPanel-form-group">';
-            $output[] = '  <a class="typo3-adminPanel-btn typo3-adminPanel-btn-default" href="#" onclick="' .
-                        htmlspecialchars($onClick) .
-                        '">';
-            $output[] = '    ' . $this->extGetLL('edit_openAB');
-            $output[] = '  </a>';
-            $output[] = '</div>';
-        }
-        return implode('', $output);
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getIdentifier(): string
-    {
-        return 'edit';
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getLabel(): string
-    {
-        return $this->extGetLL('edit');
-    }
-
-    /**
-     * Initialize the edit module
-     * Includes the frontend edit initialization
-     *
-     * @todo move into fe_edit (including the module)
-     */
-    public function initializeModule(): void
-    {
-        $extFeEditLoaded = ExtensionManagementUtility::isLoaded('feedit');
-        $typoScriptFrontend = $this->getTypoScriptFrontendController();
-        $typoScriptFrontend->displayEditIcons = $this->getConfigurationOption('displayIcons');
-        $typoScriptFrontend->displayFieldEditIcons = $this->getConfigurationOption('displayFieldIcons');
-
-        if (GeneralUtility::_GP('ADMCMD_editIcons')) {
-            $typoScriptFrontend->displayFieldEditIcons = '1';
-        }
-        if ($extFeEditLoaded && $typoScriptFrontend->displayEditIcons) {
-            $typoScriptFrontend->set_no_cache('Admin Panel: Display edit icons', true);
-        }
-        if ($extFeEditLoaded && $typoScriptFrontend->displayFieldEditIcons) {
-            $typoScriptFrontend->set_no_cache('Admin Panel: Display field edit icons', true);
-        }
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function showFormSubmitButton(): bool
-    {
-        return true;
-    }
-
-    /**
-     * @return TypoScriptFrontendController
-     */
-    protected function getTypoScriptFrontendController(): TypoScriptFrontendController
-    {
-        return $GLOBALS['TSFE'];
-    }
-}
diff --git a/typo3/sysext/frontend/Classes/AdminPanel/InfoModule.php b/typo3/sysext/frontend/Classes/AdminPanel/InfoModule.php
deleted file mode 100644 (file)
index a74cc0d..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace TYPO3\CMS\Frontend\AdminPanel;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\TimeTracker\TimeTracker;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
-
-/**
- * Admin Panel Info Module
- */
-class InfoModule extends AbstractModule
-{
-    /**
-     * Creates the content for the "info" section ("module") of the Admin Panel
-     *
-     * @return string HTML content for the section. Consists of a string with table-rows with four columns.
-     * @see display()
-     */
-    public function getContent(): string
-    {
-        $output = [];
-        $tsfe = $this->getTypoScriptFrontendController();
-        if ($this->getBackendUser()->uc['TSFE_adminConfig']['display_info']) {
-            $tableArr = [];
-            if ($this->getConfigurationOption('noCache')) {
-                $theBytes = 0;
-                $count = 0;
-                if (!empty($tsfe->imagesOnPage)) {
-                    $tableArr[] = [$this->extGetLL('info_imagesOnPage'), count($tsfe->imagesOnPage), true];
-                    foreach ($GLOBALS['TSFE']->imagesOnPage as $file) {
-                        $fs = @filesize($file);
-                        $tableArr[] = [TAB . $file, GeneralUtility::formatSize($fs)];
-                        $theBytes += $fs;
-                        $count++;
-                    }
-                }
-                // Add an empty line
-                $tableArr[] = [$this->extGetLL('info_imagesSize'), GeneralUtility::formatSize($theBytes), true];
-                $tableArr[] = [
-                    $this->extGetLL('info_DocumentSize'),
-                    GeneralUtility::formatSize(strlen($tsfe->content)),
-                    true,
-                ];
-                $tableArr[] = ['', ''];
-            }
-            $tableArr[] = [$this->extGetLL('info_id'), $tsfe->id];
-            $tableArr[] = [$this->extGetLL('info_type'), $tsfe->type];
-            $tableArr[] = [$this->extGetLL('info_groupList'), $tsfe->gr_list];
-            $tableArr[] = [
-                $this->extGetLL('info_noCache'),
-                $this->extGetLL('info_noCache_' . ($tsfe->no_cache ? 'no' : 'yes')),
-            ];
-            $tableArr[] = [$this->extGetLL('info_countUserInt'), count($tsfe->config['INTincScript'] ?? [])];
-
-            if (!empty($tsfe->fe_user->user['uid'])) {
-                $tableArr[] = [$this->extGetLL('info_feuserName'), htmlspecialchars($tsfe->fe_user->user['username'])];
-                $tableArr[] = [$this->extGetLL('info_feuserId'), htmlspecialchars($tsfe->fe_user->user['uid'])];
-            }
-
-            $tableArr[] = [
-                $this->extGetLL('info_totalParsetime'),
-                $this->getTimeTracker()->getParseTime() . ' ms',
-                true,
-            ];
-            $table = '';
-            foreach ($tableArr as $key => $arr) {
-                $label = (isset($arr[2]) ? '<strong>' . $arr[0] . '</strong>' : $arr[0]);
-                $value = (string)$arr[1] !== '' ? $arr[1] : '';
-                $table .= '
-                    <tr>
-                        <td>' . $label . '</td>
-                        <td>' . htmlspecialchars((string)$value) . '</td>
-                    </tr>';
-            }
-
-            $output[] = '<div class="typo3-adminPanel-table-overflow">';
-            $output[] = '  <table class="typo3-adminPanel-table">';
-            $output[] = '    ' . $table;
-            $output[] = '  </table>';
-            $output[] = '</div>';
-        }
-
-        return implode('', $output);
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getIdentifier(): string
-    {
-        return 'info';
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getLabel(): string
-    {
-        return $this->extGetLL('info');
-    }
-
-    /**
-     * @return TypoScriptFrontendController
-     */
-    protected function getTypoScriptFrontendController(): TypoScriptFrontendController
-    {
-        return $GLOBALS['TSFE'];
-    }
-
-    /**
-     * @return TimeTracker
-     */
-    protected function getTimeTracker(): TimeTracker
-    {
-        return GeneralUtility::makeInstance(TimeTracker::class);
-    }
-}
diff --git a/typo3/sysext/frontend/Classes/AdminPanel/PreviewModule.php b/typo3/sysext/frontend/Classes/AdminPanel/PreviewModule.php
deleted file mode 100644 (file)
index a003366..0000000
+++ /dev/null
@@ -1,266 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace TYPO3\CMS\Frontend\AdminPanel;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
-use TYPO3\CMS\Core\Type\Bitmask\Permission;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;
-use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
-
-/**
- * Admin Panel Preview Module
- */
-class PreviewModule extends AbstractModule
-{
-    /**
-     * Force the preview panel to be opened
-     *
-     * @var bool
-     */
-    protected $forceOpen = false;
-
-    /**
-     * @inheritdoc
-     */
-    public function getAdditionalJavaScriptCode(): string
-    {
-        return 'TSFEtypo3FormFieldSet("TSFE_ADMIN_PANEL[preview_simulateDate]", "datetime", "", 0, 0);';
-    }
-
-    /**
-     * Creates the content for the "preview" section ("module") of the Admin Panel
-     *
-     * @return string HTML content for the section. Consists of a string with table-rows with four columns.
-     * @see display()
-     * @throws \InvalidArgumentException
-     */
-    public function getContent(): string
-    {
-        $output = [];
-        if ($this->getBackendUser()->uc['TSFE_adminConfig']['display_preview']) {
-            $output[] = '<div class="typo3-adminPanel-form-group">';
-            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[preview_showHiddenPages]" value="0" />';
-            $output[] = '    <label for="preview_showHiddenPages">';
-            $output[] = '      <input type="checkbox" id="preview_showHiddenPages" name="TSFE_ADMIN_PANEL[preview_showHiddenPages]" value="1"' .
-                        ($this->getBackendUser(
-                        )->uc['TSFE_adminConfig']['preview_showHiddenPages'] ? ' checked="checked"' : '') .
-                        ' />';
-            $output[] = '      ' . $this->extGetLL('preview_showHiddenPages');
-            $output[] = '    </label>';
-            $output[] = '  </div>';
-            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[preview_showHiddenRecords]" value="0" />';
-            $output[] = '    <label for="preview_showHiddenRecords">';
-            $output[] = '      <input type="checkbox" id="preview_showHiddenRecords" name="TSFE_ADMIN_PANEL[preview_showHiddenRecords]" value="1"' .
-                        ($this->getBackendUser(
-                        )->uc['TSFE_adminConfig']['preview_showHiddenRecords'] ? ' checked="checked"' : '') .
-                        ' />';
-            $output[] = '      ' . $this->extGetLL('preview_showHiddenRecords');
-            $output[] = '    </label>';
-            $output[] = '  </div>';
-            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[preview_showFluidDebug]" value="0" />';
-            $output[] = '    <label for="preview_showFluidDebug">';
-            $output[] = '      <input type="checkbox" id="preview_showFluidDebug" name="TSFE_ADMIN_PANEL[preview_showFluidDebug]" value="1"' .
-                        ($this->getBackendUser(
-                        )->uc['TSFE_adminConfig']['preview_showFluidDebug'] ? ' checked="checked"' : '') .
-                        ' />';
-            $output[] = '      ' . $this->extGetLL('preview_showFluidDebug');
-            $output[] = '    </label>';
-            $output[] = '  </div>';
-            $output[] = '</div>';
-
-            // Simulate date
-            $output[] = '<div class="typo3-adminPanel-form-group">';
-            $output[] = '  <label for="preview_simulateDate">';
-            $output[] = '    ' . $this->extGetLL('preview_simulateDate');
-            $output[] = '  </label>';
-            $output[] = '  <input type="text" id="preview_simulateDate" name="TSFE_ADMIN_PANEL[preview_simulateDate]_hr" onchange="TSFEtypo3FormFieldGet(\'TSFE_ADMIN_PANEL[preview_simulateDate]\', \'datetime\', \'\', 1,0);" />';
-            // the hidden field must be placed after the _hr field to avoid the timestamp being overridden by the date string
-            $output[] = '  <input type="hidden" name="TSFE_ADMIN_PANEL[preview_simulateDate]" value="' .
-                        $this->getBackendUser()->uc['TSFE_adminConfig']['preview_simulateDate'] .
-                        '" />';
-            $output[] = '</div>';
-
-            // Frontend Usergroups
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
-                ->getQueryBuilderForTable('fe_groups');
-            $queryBuilder->getRestrictions()
-                ->removeAll()
-                ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-            $optionCount = $queryBuilder->count('fe_groups.uid')
-                ->from('fe_groups')
-                ->from('pages')
-                ->where(
-                    $queryBuilder->expr()->eq('pages.uid', $queryBuilder->quoteIdentifier('fe_groups.pid')),
-                    $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW)
-                )
-                ->execute()
-                ->fetchColumn(0);
-            if ($optionCount > 0) {
-                $result = $queryBuilder->select('fe_groups.uid', 'fe_groups.title')
-                    ->from('fe_groups')
-                    ->from('pages')
-                    ->where(
-                        $queryBuilder->expr()->eq('pages.uid', $queryBuilder->quoteIdentifier('fe_groups.pid')),
-                        $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW)
-                    )
-                    ->orderBy('fe_groups.title')
-                    ->execute();
-                $output[] = '<div class="typo3-adminPanel-form-group">';
-                $output[] = '  <label for="preview_simulateUserGroup">';
-                $output[] = '    ' . $this->extGetLL('preview_simulateUserGroup');
-                $output[] = '  </label>';
-                $output[] = '  <select id="preview_simulateUserGroup" name="TSFE_ADMIN_PANEL[preview_simulateUserGroup]">';
-                $output[] = '    <option value="0">&nbsp;</option>';
-                while ($row = $result->fetch()) {
-                    $output[] = '<option value="' .
-                                (int)$row['uid'] .
-                                '" ' .
-                                ($this->getBackendUser()->uc['TSFE_adminConfig']['preview_simulateUserGroup'] ===
-                                 $row['uid'] ? ' selected="selected"' : '') .
-                                '>';
-                    $output[] = htmlspecialchars($row['title'] . ' [' . $row['uid'] . ']');
-                    $output[] = '</option>';
-                }
-                $output[] = '  </select>';
-                $output[] = '</div>';
-            }
-        }
-        return implode('', $output);
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getIdentifier(): string
-    {
-        return 'preview';
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getLabel(): string
-    {
-        return $this->extGetLL('preview');
-    }
-
-    public function initializeModule(): void
-    {
-        $this->initializeFrontendPreview();
-        if (GeneralUtility::_GP('ADMCMD_simUser')) {
-            $this->getBackendUser()->uc['TSFE_adminConfig']['preview_simulateUserGroup'] = (int)GeneralUtility::_GP(
-                'ADMCMD_simUser'
-            );
-            $this->forceOpen = true;
-        }
-        if (GeneralUtility::_GP('ADMCMD_simTime')) {
-            $this->getBackendUser()->uc['TSFE_adminConfig']['preview_simulateDate'] = (int)GeneralUtility::_GP(
-                'ADMCMD_simTime'
-            );
-            $this->forceOpen = true;
-        }
-    }
-
-    /**
-     * Force module to be shown if either time or users/groups are simulated
-     *
-     * @return bool
-     */
-    public function isShown(): bool
-    {
-        if ($this->forceOpen) {
-            return true;
-        }
-        return parent::isShown();
-    }
-
-    /**
-     * Clear page cache if fluid debug output is enabled
-     *
-     * @param array $input
-     */
-    public function onSubmit(array $input): void
-    {
-        if ($input['preview_showFluidDebug'] ?? false) {
-            $theStartId = (int)$this->getTypoScriptFrontendController()->id;
-            $this->getTypoScriptFrontendController()
-                ->clearPageCacheContent_pidList(
-                    $this->getBackendUser()->extGetTreeList(
-                        $theStartId,
-                        0,
-                        0,
-                        $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW)
-                    ) . $theStartId
-                );
-        }
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function showFormSubmitButton(): bool
-    {
-        return true;
-    }
-
-    /**
-     * @return TypoScriptFrontendController
-     */
-    protected function getTypoScriptFrontendController(): TypoScriptFrontendController
-    {
-        return $GLOBALS['TSFE'];
-    }
-
-    /**
-     * Initialize frontend preview functionality incl.
-     * simulation of users or time
-     */
-    protected function initializeFrontendPreview()
-    {
-        $tsfe = $this->getTypoScriptFrontendController();
-        $tsfe->clear_preview();
-        $tsfe->fePreview = 1;
-        $tsfe->showHiddenPage = (bool)$this->getConfigurationOption('showHiddenPages');
-        $tsfe->showHiddenRecords = (bool)$this->getConfigurationOption('showHiddenRecords');
-        // Simulate date
-        $simTime = $this->getConfigurationOption('simulateDate');
-        if ($simTime) {
-            $GLOBALS['SIM_EXEC_TIME'] = $simTime;
-            $GLOBALS['SIM_ACCESS_TIME'] = $simTime - $simTime % 60;
-        }
-        // simulate user
-        $tsfe->simUserGroup = $this->getConfigurationOption('simulateUserGroup');
-        if ($tsfe->simUserGroup) {
-            if ($tsfe->fe_user->user) {
-                $tsfe->fe_user->user[$tsfe->fe_user->usergroup_column] = $tsfe->simUserGroup;
-            } else {
-                $tsfe->fe_user = GeneralUtility::makeInstance(FrontendUserAuthentication::class);
-                $tsfe->fe_user->user = [
-                    $tsfe->fe_user->usergroup_column => $tsfe->simUserGroup,
-                ];
-            }
-        }
-        if (!$tsfe->simUserGroup && !$simTime && !$tsfe->showHiddenPage && !$tsfe->showHiddenRecords) {
-            $tsfe->fePreview = 0;
-        }
-    }
-}
diff --git a/typo3/sysext/frontend/Classes/AdminPanel/TsDebugModule.php b/typo3/sysext/frontend/Classes/AdminPanel/TsDebugModule.php
deleted file mode 100644 (file)
index e51c181..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace TYPO3\CMS\Frontend\AdminPanel;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\TimeTracker\TimeTracker;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
-
-/**
- * Admin Panel TypoScript Debug Module
- */
-class TsDebugModule extends AbstractModule
-{
-
-    /**
-     * Creates the content for the "tsdebug" section ("module") of the Admin Panel
-     *
-     * @return string HTML content for the section. Consists of a string with table-rows with four columns.
-     */
-    public function getContent(): string
-    {
-        $output = [];
-        $beuser = $this->getBackendUser();
-        if ($beuser->uc['TSFE_adminConfig']['display_tsdebug']) {
-            $output[] = '<div class="typo3-adminPanel-form-group">';
-            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_tree]" value="0" />';
-            $output[] = '    <label for="tsdebug_tree">';
-            $output[] = '      <input type="checkbox" id="tsdebug_tree" name="TSFE_ADMIN_PANEL[tsdebug_tree]" value="1"' .
-                        ($this->getBackendUser()->uc['TSFE_adminConfig']['tsdebug_tree'] ? ' checked="checked"' : '') .
-                        ' />';
-            $output[] = '      ' . $this->extGetLL('tsdebug_tree');
-            $output[] = '    </label>';
-            $output[] = '  </div>';
-            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_displayTimes]" value="0" />';
-            $output[] = '    <label for="tsdebug_displayTimes">';
-            $output[] = '      <input type="checkbox" id="tsdebug_displayTimes" name="TSFE_ADMIN_PANEL[tsdebug_displayTimes]" value="1"' .
-                        ($this->getBackendUser(
-                        )->uc['TSFE_adminConfig']['tsdebug_displayTimes'] ? ' checked="checked"' : '') .
-                        ' />';
-            $output[] = '      ' . $this->extGetLL('tsdebug_displayTimes');
-            $output[] = '    </label>';
-            $output[] = '  </div>';
-            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_displayMessages]" value="0" />';
-            $output[] = '    <label for="tsdebug_displayMessages">';
-            $output[] = '      <input type="checkbox" id="tsdebug_displayMessages" name="TSFE_ADMIN_PANEL[tsdebug_displayMessages]" value="1"' .
-                        ($this->getBackendUser(
-                        )->uc['TSFE_adminConfig']['tsdebug_displayMessages'] ? ' checked="checked"' : '') .
-                        ' />';
-            $output[] = '      ' . $this->extGetLL('tsdebug_displayMessages');
-            $output[] = '    </label>';
-            $output[] = '  </div>';
-            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_LR]" value="0" />';
-            $output[] = '    <label for="tsdebug_LR">';
-            $output[] = '      <input type="checkbox" id="tsdebug_LR" name="TSFE_ADMIN_PANEL[tsdebug_LR]" value="1"' .
-                        ($this->getBackendUser()->uc['TSFE_adminConfig']['tsdebug_LR'] ? ' checked="checked"' : '') .
-                        ' />';
-            $output[] = '      ' . $this->extGetLL('tsdebug_LR');
-            $output[] = '    </label>';
-            $output[] = '  </div>';
-            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_displayContent]" value="0" />';
-            $output[] = '    <label for="tsdebug_displayContent">';
-            $output[] = '      <input type="checkbox" id="tsdebug_displayContent" name="TSFE_ADMIN_PANEL[tsdebug_displayContent]" value="1"' .
-                        ($this->getBackendUser(
-                        )->uc['TSFE_adminConfig']['tsdebug_displayContent'] ? ' checked="checked"' : '') .
-                        ' />';
-            $output[] = '      ' . $this->extGetLL('tsdebug_displayContent');
-            $output[] = '    </label>';
-            $output[] = '  </div>';
-            $output[] = '  <div class="typo3-adminPanel-form-group-checkbox">';
-            $output[] = '    <input type="hidden" name="TSFE_ADMIN_PANEL[tsdebug_forceTemplateParsing]" value="0" />';
-            $output[] = '    <label for="tsdebug_forceTemplateParsing">';
-            $output[] = '      <input type="checkbox" id="tsdebug_forceTemplateParsing" name="TSFE_ADMIN_PANEL[tsdebug_forceTemplateParsing]" value="1"' .
-                        ($this->getBackendUser(
-                        )->uc['TSFE_adminConfig']['tsdebug_forceTemplateParsing'] ? ' checked="checked"' : '') .
-                        ' />';
-            $output[] = '      ' . $this->extGetLL('tsdebug_forceTemplateParsing');
-            $output[] = '    </label>';
-            $output[] = '  </div>';
-            $output[] = '</div>';
-
-            $timeTracker = $this->getTimeTracker();
-            $timeTracker->printConf['flag_tree'] = $this->getConfigurationOption('tree');
-            $timeTracker->printConf['allTime'] = $this->getConfigurationOption('displayTimes');
-            $timeTracker->printConf['flag_messages'] = $this->getConfigurationOption('displayMessages');
-            $timeTracker->printConf['flag_content'] = $this->getConfigurationOption('displayContent');
-            $output[] = $timeTracker->printTSlog();
-        }
-        return implode('', $output);
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getIdentifier(): string
-    {
-        return 'tsdebug';
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function getLabel(): string
-    {
-        return $this->extGetLL('tsdebug');
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function initializeModule(): void
-    {
-        $typoScriptFrontend = $this->getTypoScriptFrontendController();
-        $typoScriptFrontend->forceTemplateParsing = (bool)$this->getConfigurationOption('forceTemplateParsing');
-        if ($typoScriptFrontend->forceTemplateParsing) {
-            $typoScriptFrontend->set_no_cache('Admin Panel: Force template parsing', true);
-        }
-        $this->getTimeTracker()->LR = (bool)$this->getConfigurationOption('LR');
-    }
-
-    /**
-     * @inheritdoc
-     */
-    public function showFormSubmitButton(): bool
-    {
-        return true;
-    }
-
-    /**
-     * @return TimeTracker
-     */
-    protected function getTimeTracker(): TimeTracker
-    {
-        return GeneralUtility::makeInstance(TimeTracker::class);
-    }
-
-    /**
-     * @return TypoScriptFrontendController
-     */
-    protected function getTypoScriptFrontendController(): TypoScriptFrontendController
-    {
-        return $GLOBALS['TSFE'];
-    }
-}
diff --git a/typo3/sysext/frontend/Classes/View/AdminPanelView.php b/typo3/sysext/frontend/Classes/View/AdminPanelView.php
deleted file mode 100644 (file)
index 3815dd4..0000000
+++ /dev/null
@@ -1,827 +0,0 @@
-<?php
-
-namespace TYPO3\CMS\Frontend\View;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Cache\CacheManager;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer;
-use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Service\DependencyOrderingService;
-use TYPO3\CMS\Core\Type\Bitmask\Permission;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\PathUtility;
-use TYPO3\CMS\Frontend\AdminPanel\AdminPanelModuleInterface;
-
-/**
- * View class for the admin panel in frontend editing.
- */
-class AdminPanelView
-{
-    /**
-     * Determines whether the update button should be shown.
-     *
-     * @var bool
-     */
-    protected $extNeedUpdate = false;
-
-    /**
-     * Force preview
-     *
-     * @var bool
-     */
-    protected $ext_forcePreview = false;
-
-    /**
-     * @var string
-     */
-    protected $extJSCODE = '';
-
-    /**
-     * @var IconFactory
-     */
-    protected $iconFactory;
-
-    /**
-     * Array of adminPanel modules
-     *
-     * @var AdminPanelModuleInterface[]
-     */
-    protected $modules = [];
-
-    /**
-     * Constructor
-     */
-    public function __construct()
-    {
-        $this->initialize();
-    }
-
-    /**
-     * Initializes settings for the admin panel.
-     */
-    public function initialize()
-    {
-        $this->validateSortAndInitializeModules();
-        $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-        $this->saveConfiguration();
-
-        foreach ($this->modules as $module) {
-            if ($module->isEnabled()) {
-                $module->initializeModule();
-            }
-        }
-    }
-
-    /**
-     * Returns a link tag with the admin panel stylesheet
-     * defined using TBE_STYLES
-     *
-     * @return string
-     */
-    protected function getAdminPanelStylesheet(): string
-    {
-        $result = '';
-        if (!empty($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) {
-            $stylesheet = GeneralUtility::locationHeaderUrl($GLOBALS['TBE_STYLES']['stylesheets']['admPanel']);
-            $result = '<link rel="stylesheet" type="text/css" href="' . htmlspecialchars($stylesheet) . '" />';
-        }
-        return $result;
-    }
-
-    /**
-     * Render a single module with header panel
-     *
-     * @param \TYPO3\CMS\Frontend\AdminPanel\AdminPanelModuleInterface $module
-     * @return string
-     */
-    protected function getModule(AdminPanelModuleInterface $module): string
-    {
-        $output = [];
-
-        if ($module->isEnabled()) {
-            $output[] = '<div class="typo3-adminPanel-section typo3-adminPanel-section-' .
-                        ($module->isOpen() ? 'open' : 'closed') .
-                        '">';
-            $output[] = '  <div class="typo3-adminPanel-section-title">';
-            $output[] = '    ' . $this->getSectionOpenerLink($module);
-            $output[] = '  </div>';
-            if ($module->isOpen()) {
-                $output[] = '<div class="typo3-adminPanel-section-body">';
-                $output[] = '  ' . $module->getContent();
-                $output[] = '</div>';
-            }
-            $output[] = '</div>';
-        }
-
-        return implode('', $output);
-    }
-
-    /**
-     * Creates and returns the HTML code for the Admin Panel in the TSFE frontend.
-     *
-     * @throws \UnexpectedValueException
-     * @return string HTML for the Admin Panel
-     */
-    public function display()
-    {
-        $this->getLanguageService()->includeLLFile('EXT:lang/Resources/Private/Language/locallang_tsfe.xlf');
-
-        $moduleContent = '';
-
-        if ($this->isAdminPanelActivated()) {
-            foreach ($this->modules as $module) {
-                if ($module->isOpen()) {
-                    $this->extNeedUpdate = !$this->extNeedUpdate ? $module->showFormSubmitButton() : true;
-                    $this->extJSCODE .= $module->getAdditionalJavaScriptCode();
-                }
-                $moduleContent .= $this->getModule($module);
-            }
-
-            foreach (
-                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_adminpanel.php']['extendAdminPanel']
-                ??
-                [] as $className
-            ) {
-                trigger_error(
-                    'The hook $GLOBALS[\'TYPO3_CONF_VARS\'][\'SC_OPTIONS\'][\'tslib/class.tslib_adminpanel.php\'][\'extendAdminPanel\'] is deprecated, register an AdminPanelModule instead.',
-                    E_USER_DEPRECATED
-                );
-                $hookObject = GeneralUtility::makeInstance($className);
-                if (!$hookObject instanceof AdminPanelViewHookInterface) {
-                    throw new \UnexpectedValueException(
-                        $className . ' must implement interface ' . AdminPanelViewHookInterface::class,
-                        1311942539
-                    );
-                }
-                $content = $hookObject->extendAdminPanel($moduleContent, $this);
-                if ($content) {
-                    $moduleContent .= '<div class="typo3-adminPanel-section typo3-adminPanel-section-open">';
-                    $moduleContent .= '  <div class="typo3-adminPanel-section-body">';
-                    $moduleContent .= '    ' . $content;
-                    $moduleContent .= '  </div>';
-                    $moduleContent .= '</div>';
-                }
-            }
-        }
-
-        $output = [];
-        $output[] = '<!-- TYPO3 Admin panel start -->';
-        $output[] = '<a id="TSFE_ADMIN_PANEL"></a>';
-        $output[] = '<form id="TSFE_ADMIN_PANEL_FORM" name="TSFE_ADMIN_PANEL_FORM" style="display: none;" action="' . htmlspecialchars(GeneralUtility::getIndpEnv('TYPO3_REQUEST_SCRIPT')) . '#TSFE_ADMIN_PANEL" method="get" onsubmit="document.forms.TSFE_ADMIN_PANEL_FORM[\'TSFE_ADMIN_PANEL[DUMMY]\'].value=Math.random().toString().substring(2,8)">';
-        if (!GeneralUtility::_GET('id')) {
-            $output[] = '<input type="hidden" name="id" value="' . $this->getTypoScriptFrontendController()->id . '" />';
-        }
-        // The dummy field is needed for Firefox: to force a page reload on submit
-        // which must change the form value with JavaScript (see "onsubmit" attribute of the "form" element")
-        $output[] = '  <input type="hidden" name="TSFE_ADMIN_PANEL[DUMMY]" value="" />';
-        foreach (GeneralUtility::_GET() as $key => $value) {
-            if ($key !== 'TSFE_ADMIN_PANEL') {
-                if (is_array($value)) {
-                    $output[] = $this->getHiddenFields($key, $value);
-                } else {
-                    $output[] = '<input type="hidden" name="' . htmlspecialchars($key) . '" value="' . htmlspecialchars($value) . '" />';
-                }
-            }
-        }
-        $output[] = '  <input type="hidden" name="TSFE_ADMIN_PANEL[display_top]" value="0" />';
-        $output[] = '  <input id="typo3AdminPanelEnable" type="checkbox" onchange="document.TSFE_ADMIN_PANEL_FORM.submit();" name="TSFE_ADMIN_PANEL[display_top]" value="1"' .
-                    ($this->isAdminPanelActivated() ? ' checked="checked"' : '') .
-                    '/>';
-        $output[] = '  <input id="typo3AdminPanelCollapse" type="checkbox" value="1" />';
-        $output[] = '  <div class="typo3-adminPanel typo3-adminPanel-state-' .
-                    ($this->isAdminPanelActivated() ? 'open' : 'closed') .
-                    '">';
-        $output[] = '    <div class="typo3-adminPanel-header">';
-        $output[] = '      <span class="typo3-adminPanel-header-title">' . $this->extGetLL('adminPanelTitle') . '</span>';
-        $output[] = '      <span class="typo3-adminPanel-header-user">' . htmlspecialchars($this->getBackendUser()->user['username']) . '</span>';
-        $output[] = '      <label for="typo3AdminPanelEnable" class="typo3-adminPanel-header-enable">';
-        $output[] = '        <span class="typo3-adminPanel-header-enable-enabled">';
-        $output[] = '          ' . $this->iconFactory->getIcon('actions-edit-hide', Icon::SIZE_SMALL)->render('inline');
-        $output[] = '        </span>';
-        $output[] = '        <span class="typo3-adminPanel-header-enable-disabled">';
-        $output[] = '          ' . $this->iconFactory->getIcon('actions-edit-unhide', Icon::SIZE_SMALL)->render('inline');
-        $output[] = '        </span>';
-        $output[] = '      </label>';
-        $output[] = '      <label for="typo3AdminPanelCollapse" class="typo3-adminPanel-header-collapse">';
-        $output[] = '        <span class="typo3-adminPanel-header-collapse-enabled">';
-        $output[] = '          ' . $this->iconFactory->getIcon('actions-view-list-collapse', Icon::SIZE_SMALL)->render('inline');
-        $output[] = '        </span>';
-        $output[] = '        <span class="typo3-adminPanel-header-collapse-disabled">';
-        $output[] = '          ' . $this->iconFactory->getIcon('actions-view-list-expand', Icon::SIZE_SMALL)->render('inline');
-        $output[] = '        </span>';
-        $output[] = '      </label>';
-        $output[] = '    </div>';
-        if ($moduleContent && $this->extNeedUpdate) {
-            $output[] = '<div class="typo3-adminPanel-actions">';
-            $output[] = '  <input class="typo3-adminPanel-btn typo3-adminPanel-btn-dark" type="submit" value="' . $this->extGetLL('update') . '" />';
-            $output[] = '</div>';
-        }
-        $output[] = '    <div class="typo3-adminPanel-body">';
-        $output[] = '      ' . $moduleContent;
-        $output[] = '    </div>';
-        $output[] = '  </div>';
-        $output[] = '</form>';
-        if ($this->getBackendUser()->uc['TSFE_adminConfig']['display_top']) {
-            $evalFieldJavaScriptFile = GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Public/JavaScript/jsfunc.evalfield.js');
-            $output[] = '<script type="text/javascript" src="' . htmlspecialchars(PathUtility::getAbsoluteWebPath($evalFieldJavaScriptFile)) . '"></script>';
-            $output[] = '<script type="text/javascript">/*<![CDATA[*/' . GeneralUtility::minifyJavaScript('
-                               var evalFunc = new evalFunc();
-                                       // TSFEtypo3FormFieldSet()
-                               function TSFEtypo3FormFieldSet(theField, evallist, is_in, checkbox, checkboxValue) {    //
-                                       var theFObj = new evalFunc_dummy (evallist,is_in, checkbox, checkboxValue);
-                                       var theValue = document.TSFE_ADMIN_PANEL_FORM[theField].value;
-                                       if (checkbox && theValue==checkboxValue) {
-                                               document.TSFE_ADMIN_PANEL_FORM[theField+"_hr"].value="";
-                                               alert(theField);
-                                               document.TSFE_ADMIN_PANEL_FORM[theField+"_cb"].checked = "";
-                                       } else {
-                                               document.TSFE_ADMIN_PANEL_FORM[theField+"_hr"].value = evalFunc.outputObjValue(theFObj, theValue);
-                                               if (document.TSFE_ADMIN_PANEL_FORM[theField+"_cb"]) {
-                                                       document.TSFE_ADMIN_PANEL_FORM[theField+"_cb"].checked = "on";
-                                               }
-                                       }
-                               }
-                                       // TSFEtypo3FormFieldGet()
-                               function TSFEtypo3FormFieldGet(theField, evallist, is_in, checkbox, checkboxValue, checkbox_off) {      //
-                                       var theFObj = new evalFunc_dummy (evallist,is_in, checkbox, checkboxValue);
-                                       if (checkbox_off) {
-                                               document.TSFE_ADMIN_PANEL_FORM[theField].value=checkboxValue;
-                                       }else{
-                                               document.TSFE_ADMIN_PANEL_FORM[theField].value = evalFunc.evalObjValue(theFObj, document.TSFE_ADMIN_PANEL_FORM[theField+"_hr"].value);
-                                       }
-                                       TSFEtypo3FormFieldSet(theField, evallist, is_in, checkbox, checkboxValue);
-                               }') . '/*]]>*/</script>';
-            $output[] = '<script language="javascript" type="text/javascript">' . $this->extJSCODE . '</script>';
-        }
-        $cssFileLocation = GeneralUtility::getFileAbsFileName('EXT:frontend/Resources/Public/Css/adminpanel.css');
-        $output[] = '<link type="text/css" rel="stylesheet" href="' . htmlspecialchars(PathUtility::getAbsoluteWebPath($cssFileLocation)) . '" media="all" />';
-        $output[] = $this->getAdminPanelStylesheet();
-        $output[] = '<!-- TYPO3 admin panel end -->';
-
-        return implode('', $output);
-    }
-
-    /**
-     * Fetches recursively all GET parameters as hidden fields.
-     * Called from display()
-     *
-     * @param string $key Current key
-     * @param array $val Current value
-     * @return string Hidden fields HTML-code
-     * @see display()
-     */
-    protected function getHiddenFields($key, array $val)
-    {
-        $out = '';
-        foreach ($val as $k => $v) {
-            if (is_array($v)) {
-                $out .= $this->getHiddenFields($key . '[' . $k . ']', $v);
-            } else {
-                $out .= '<input type="hidden" name="' . htmlspecialchars($key) . '[' . htmlspecialchars($k) . ']" value="' . htmlspecialchars($v) . '">' . LF;
-            }
-        }
-        return $out;
-    }
-
-    /**
-     * Returns true if admin panel was activated
-     * (switched "on" via GUI)
-     *
-     * @return bool
-     */
-    protected function isAdminPanelActivated(): bool
-    {
-        return $this->getBackendUser()->uc['TSFE_adminConfig']['display_top'] ?? false;
-    }
-
-    /**
-     * Save admin panel configuration to backend user UC
-     */
-    protected function saveConfiguration()
-    {
-        $input = GeneralUtility::_GP('TSFE_ADMIN_PANEL');
-        $beUser = $this->getBackendUser();
-        if (is_array($input)) {
-            // Setting
-            $beUser->uc['TSFE_adminConfig'] = array_merge(
-                !is_array($beUser->uc['TSFE_adminConfig']) ? [] : $beUser->uc['TSFE_adminConfig'],
-                $input
-            );
-            unset($beUser->uc['TSFE_adminConfig']['action']);
-
-            foreach ($this->modules as $module) {
-                if ($module->isEnabled() && $module->isOpen()) {
-                    $module->onSubmit($input);
-                }
-            }
-            // Saving
-            $beUser->writeUC();
-            // Flush fluid template cache
-            $cacheManager = new CacheManager();
-            $cacheManager->setCacheConfigurations($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']);
-            $cacheManager->getCache('fluid_template')->flush();
-        }
-    }
-
-    /**
-     * Validates, sorts and initiates the registered modules
-     *
-     * @throws \RuntimeException
-     */
-    protected function validateSortAndInitializeModules(): void
-    {
-        $modules = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['frontend']['adminPanelModules'] ?? [];
-        if (empty($modules)) {
-            return;
-        }
-        foreach ($modules as $identifier => $configuration) {
-            if (empty($configuration) || !is_array($configuration)) {
-                throw new \RuntimeException(
-                    'Missing configuration for module "' . $identifier . '".',
-                    1519490105
-                );
-            }
-            if (!is_string($configuration['module']) ||
-                empty($configuration['module']) ||
-                !class_exists($configuration['module']) ||
-                !is_subclass_of(
-                    $configuration['module'],
-                    AdminPanelModuleInterface::class
-                )) {
-                throw new \RuntimeException(
-                    'The module "' .
-                    $identifier .
-                    '" defines an invalid module class. Ensure the class exists and implements the "' .
-                    AdminPanelModuleInterface::class .
-                    '".',
-                    1519490112
-                );
-            }
-        }
-
-        $orderedModules = GeneralUtility::makeInstance(DependencyOrderingService::class)->orderByDependencies(
-            $modules
-        );
-
-        foreach ($orderedModules as $module) {
-            $this->modules[] = GeneralUtility::makeInstance($module['module']);
-        }
-    }
-
-    /*****************************************************
-     * Admin Panel Layout Helper functions
-     ****************************************************/
-
-    /**
-     * Wraps a string in a link which will open/close a certain part of the Admin Panel
-     *
-     * @param \TYPO3\CMS\Frontend\AdminPanel\AdminPanelModuleInterface $module
-     * @return string
-     */
-    protected function getSectionOpenerLink(AdminPanelModuleInterface $module): string
-    {
-        $identifier = $module->getIdentifier();
-        $onclick = 'document.TSFE_ADMIN_PANEL_FORM[' .
-                   GeneralUtility::quoteJSvalue('TSFE_ADMIN_PANEL[display_' . $identifier . ']') .
-                   '].value=' .
-                   ($this->getBackendUser()->uc['TSFE_adminConfig']['display_' . $identifier] ? '0' : '1') .
-                   ';document.TSFE_ADMIN_PANEL_FORM.submit();return false;';
-
-        $output = [];
-        $output[] = '<span class="typo3-adminPanel-section-title-identifier"></span>';
-        $output[] = '<a href="javascript:void(0)" onclick="' . htmlspecialchars($onclick) . '">';
-        $output[] = '  ' . htmlspecialchars($module->getLabel());
-        $output[] = '</a>';
-        $output[] = '<input type="hidden" name="TSFE_ADMIN_PANEL[display_' .
-                    $identifier .
-                    ']" value="' .
-                    (int)$module->isOpen() .
-                    '" />';
-
-        return implode('', $output);
-    }
-
-    /**
-     * Creates the tool bar links for the "edit" section of the Admin Panel.
-     *
-     * @return string A string containing images wrapped in <a>-tags linking them to proper functions.
-     */
-    public function ext_makeToolBar()
-    {
-        $tsfe = $this->getTypoScriptFrontendController();
-        //  If mod.newContentElementWizard.override is set, use that extension's create new content wizard instead:
-        $tsConfig = BackendUtility::getModTSconfig($tsfe->page['uid'], 'mod');
-        $moduleName = $tsConfig['properties']['newContentElementWizard.']['override'] ?? 'new_content_element';
-        /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
-        $perms = $this->getBackendUser()->calcPerms($tsfe->page);
-        $langAllowed = $this->getBackendUser()->checkLanguageAccess($tsfe->sys_language_uid);
-        $id = $tsfe->id;
-        $returnUrl = GeneralUtility::getIndpEnv('REQUEST_URI');
-        $classes = 'typo3-adminPanel-btn typo3-adminPanel-btn-default';
-        $output = [];
-        $output[] = '<div class="typo3-adminPanel-form-group">';
-        $output[] = '  <div class="typo3-adminPanel-btn-group" role="group">';
-
-        // History
-        $link = (string)$uriBuilder->buildUriFromRoute(
-            'record_history',
-            [
-                'element' => 'pages:' . $id,
-                'returnUrl' => $returnUrl
-            ]
-        );
-        $title = $this->extGetLL('edit_recordHistory');
-        $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '#latest" title="' . $title . '">';
-        $output[] = '  ' . $this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL)->render();
-        $output[] = '</a>';
-
-        // New Content
-        if ($perms & Permission::CONTENT_EDIT && $langAllowed) {
-            $linkParameters = [
-                'id' => $id,
-                'returnUrl' => $returnUrl,
-            ];
-            if (!empty($tsfe->sys_language_uid)) {
-                $linkParameters['sys_language_uid'] = $tsfe->sys_language_uid;
-            }
-            $link = (string)$uriBuilder->buildUriFromRoute($moduleName, $linkParameters);
-            $icon = $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render();
-            $title = $this->extGetLL('edit_newContentElement');
-            $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
-            $output[] = '  ' . $icon;
-            $output[] = '</a>';
-        }
-
-        // Move Page
-        if ($perms & Permission::PAGE_EDIT) {
-            $link = (string)$uriBuilder->buildUriFromRoute(
-                'move_element',
-                [
-                    'table' => 'pages',
-                    'uid' => $id,
-                    'returnUrl' => $returnUrl
-                ]
-            );
-            $icon = $this->iconFactory->getIcon('actions-document-move', Icon::SIZE_SMALL)->render();
-            $title = $this->extGetLL('edit_move_page');
-            $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
-            $output[] = '  ' . $icon;
-            $output[] = '</a>';
-        }
-
-        // New Page
-        if ($perms & Permission::PAGE_NEW) {
-            $link = (string)$uriBuilder->buildUriFromRoute(
-                'db_new',
-                [
-                    'id' => $id,
-                    'pagesOnly' => 1,
-                    'returnUrl' => $returnUrl
-                ]
-            );
-            $icon = $this->iconFactory->getIcon('actions-page-new', Icon::SIZE_SMALL)->render();
-            $title = $this->extGetLL('edit_newPage');
-            $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
-            $output[] = '  ' . $icon;
-            $output[] = '</a>';
-        }
-
-        // Edit Page
-        if ($perms & Permission::PAGE_EDIT) {
-            $link = (string)$uriBuilder->buildUriFromRoute(
-                'record_edit',
-                [
-                    'edit[pages][' . $id . ']' => 'edit',
-                    'noView' => 1,
-                    'returnUrl' => $returnUrl
-                ]
-            );
-            $icon = $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)->render();
-            $title = $this->extGetLL('edit_editPageProperties');
-            $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
-            $output[] = '  ' . $icon;
-            $output[] = '</a>';
-        }
-
-        // Edit Page Overlay
-        if ($perms & Permission::PAGE_EDIT && $tsfe->sys_language_uid && $langAllowed) {
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
-                ->getQueryBuilderForTable('pages');
-            $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
-            $row = $queryBuilder
-                ->select('uid', 'pid', 't3ver_state')
-                ->from('pages')
-                ->where(
-                    $queryBuilder->expr()->eq(
-                        $GLOBALS['TCA']['pages']['ctrl']['transOrigPointerField'],
-                        $queryBuilder->createNamedParameter($id, \PDO::PARAM_INT)
-                    ),
-                    $queryBuilder->expr()->eq(
-                        $GLOBALS['TCA']['pages']['ctrl']['languageField'],
-                        $queryBuilder->createNamedParameter($tsfe->sys_language_uid, \PDO::PARAM_INT)
-                    )
-                )
-                ->setMaxResults(1)
-                ->execute()
-                ->fetch();
-            $tsfe->sys_page->versionOL('pages', $row);
-            if (is_array($row)) {
-                $link = (string)$uriBuilder->buildUriFromRoute(
-                    'record_edit',
-                    [
-                        'edit[pages][' . $row['uid'] . ']' => 'edit',
-                        'noView' => 1,
-                        'returnUrl' => $returnUrl
-                    ]
-                );
-                $icon = $this->iconFactory->getIcon('mimetypes-x-content-page-language-overlay', Icon::SIZE_SMALL)->render();
-                $title = $this->extGetLL('edit_editPageOverlay');
-                $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
-                $output[] = '  ' . $icon;
-                $output[] = '</a>';
-            }
-        }
-
-        // Open list view
-        if ($this->getBackendUser()->check('modules', 'web_list')) {
-            $link = (string)$uriBuilder->buildUriFromRoute(
-                'web_list',
-                [
-                    'id' => $id,
-                    'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
-                ]
-            );
-            $icon = $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render();
-            $title = $this->extGetLL('edit_db_list');
-            $output[] = '<a class="' . $classes . '" href="' . htmlspecialchars($link) . '" title="' . $title . '">';
-            $output[] = '  ' . $icon;
-            $output[] = '</a>';
-        }
-
-        $output[] = '  </div>';
-        $output[] = '</div>';
-        return implode('', $output);
-    }
-
-    /**
-     * Translate given key
-     *
-     * @param string $key Key for a label in the $LOCAL_LANG array of "sysext/lang/Resources/Private/Language/locallang_tsfe.xlf
-     * @param bool $convertWithHtmlspecialchars If TRUE the language-label will be sent through htmlspecialchars
-     * @return string The value for the $key
-     */
-    protected function extGetLL($key, $convertWithHtmlspecialchars = true)
-    {
-        $labelStr = $this->getLanguageService()->getLL($key);
-        if ($convertWithHtmlspecialchars) {
-            $labelStr = htmlspecialchars($labelStr);
-        }
-        return $labelStr;
-    }
-
-    /**
-     * Returns LanguageService
-     *
-     * @return \TYPO3\CMS\Core\Localization\LanguageService
-     */
-    protected function getLanguageService()
-    {
-        return $GLOBALS['LANG'];
-    }
-
-    /**
-     * Returns the current BE user.
-     *
-     * @return \TYPO3\CMS\Backend\FrontendBackendUserAuthentication
-     */
-    protected function getBackendUser()
-    {
-        return $GLOBALS['BE_USER'];
-    }
-
-    /**
-     * @return \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
-     */
-    protected function getTypoScriptFrontendController()
-    {
-        return $GLOBALS['TSFE'];
-    }
-
-    /*****************************************************
-     * Admin Panel: Deprecated API
-     ****************************************************/
-
-    /**
-     * Add an additional stylesheet
-     *
-     * @return string
-     * @deprecated since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)
-     */
-    public function getAdminPanelHeaderData()
-    {
-        trigger_error(
-            'Deprecated since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)',
-            E_USER_DEPRECATED
-        );
-        return $this->getAdminPanelStylesheet();
-    }
-
-    /**
-     * Checks if an Admin Panel section ("module") is available for the user. If so, TRUE is returned.
-     *
-     * @param string $key The module key, eg. "edit", "preview", "info" etc.
-     * @deprecated but still called in FrontendBackendUserAuthentication (will be refactored in a separate step)
-     * @return bool
-     */
-    public function isAdminModuleEnabled($key)
-    {
-        $result = false;
-        // Returns TRUE if the module checked is "preview" and the forcePreview flag is set.
-        if ($key === 'preview' && $this->ext_forcePreview) {
-            $result = true;
-        } elseif (!empty($this->getBackendUser()->extAdminConfig['enable.']['all'])) {
-            $result = true;
-        } elseif (!empty($this->getBackendUser()->extAdminConfig['enable.'][$key])) {
-            $result = true;
-        }
-        return $result;
-    }
-
-    /**
-     * Saves any change in settings made in the Admin Panel.
-     *
-     * @deprecated since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)
-     */
-    public function saveConfigOptions()
-    {
-        trigger_error(
-            'Deprecated since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)',
-            E_USER_DEPRECATED
-        );
-        $this->saveConfiguration();
-    }
-
-    /**
-     * Returns the value for an Admin Panel setting.
-     *
-     * @param string $sectionName Module key
-     * @param string $val Setting key
-     * @return mixed The setting value
-     * @deprecated Since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)
-     */
-    public function extGetFeAdminValue($sectionName, $val = '')
-    {
-        trigger_error(
-            'Deprecated since TYPO3 v9 - implement AdminPanelModules via the new API (see AdminPanelModuleInterface)',
-            E_USER_DEPRECATED
-        );
-        if (!$this->isAdminModuleEnabled($sectionName)) {
-            return null;
-        }
-
-        $beUser = $this->getBackendUser();
-        // Exceptions where the values can be overridden (forced) from backend:
-        // deprecated
-        if (
-            $sectionName === 'edit' && (
-                $val === 'displayIcons' && $beUser->extAdminConfig['module.']['edit.']['forceDisplayIcons'] ||
-                $val === 'displayFieldIcons' && $beUser->extAdminConfig['module.']['edit.']['forceDisplayFieldIcons'] ||
-                $val === 'editNoPopup' && $beUser->extAdminConfig['module.']['edit.']['forceNoPopup']
-            )
-        ) {
-            return true;
-        }
-
-        // Override all settings with user TSconfig
-        if ($val && isset($beUser->extAdminConfig['override.'][$sectionName . '.'][$val])) {
-            return $beUser->extAdminConfig['override.'][$sectionName . '.'][$val];
-        }
-        if (!$val && isset($beUser->extAdminConfig['override.'][$sectionName])) {
-            return $beUser->extAdminConfig['override.'][$sectionName];
-        }
-
-        $returnValue = $val ? $beUser->uc['TSFE_adminConfig'][$sectionName . '_' . $val] : 1;
-
-        // Exception for preview
-        if ($sectionName === 'preview' && $this->ext_forcePreview) {
-            return !$val ? true : $returnValue;
-        }
-
-        // See if the menu is expanded!
-        return $this->isAdminModuleOpen($sectionName) ? $returnValue : null;
-    }
-
-    /**
-     * Enables the force preview option.
-     *
-     * @deprecated since TYPO3 v9 - see AdminPanelModule: Preview
-     */
-    public function forcePreview()
-    {
-        trigger_error('Deprecated since TYPO3 v9, see AdminPanelModule: Preview', E_USER_DEPRECATED);
-        $this->ext_forcePreview = true;
-    }
-
-    /**
-     * Returns TRUE if admin panel module is open
-     *
-     * @param string $key Module key
-     * @return bool TRUE, if the admin panel is open for the specified admin panel module key.
-     * @deprecated Since TYPO3 v9 - implement AdminPanelModules via the new API
-     */
-    public function isAdminModuleOpen($key)
-    {
-        trigger_error('since TYPO3 v9 - use new AdminPanel API instead', E_USER_DEPRECATED);
-        return $this->getBackendUser()->uc['TSFE_adminConfig']['display_top'] &&
-               $this->getBackendUser()->uc['TSFE_adminConfig']['display_' . $key];
-    }
-
-    /**
-     * Returns a row (with 4 columns) for content in a section of the Admin Panel.
-     * It will take $pre as a key to a label to display and $element as the content to put into the forth cell.
-     *
-     * @param string $title Key to label
-     * @param string $content The HTML content for the forth table cell.
-     * @param string $checkbox The HTML for a checkbox or hidden fields.
-     * @param string $innerDivClass The Class attribute for the td element.
-     * @param string $outerDivClass The Class attribute for the tr element.
-     * @return string HTML table row.
-     * @see extGetHead()
-     * @deprecated since TYPO3 v9 - use new AdminPanel API instead
-     */
-    public function extGetItem($title, $content = '', $checkbox = '', $outerDivClass = null, $innerDivClass = null)
-    {
-        trigger_error('since TYPO3 v9 - use new AdminPanel API instead', E_USER_DEPRECATED);
-        $title = $title ? '<label for="' . htmlspecialchars($title) . '">' . $this->extGetLL($title) . '</label>' : '';
-        $out = '';
-        $out .= (string)$outerDivClass ? '<div class="' . htmlspecialchars($outerDivClass) . '">' : '<div>';
-        $out .= (string)$innerDivClass ? '<div class="' . htmlspecialchars($innerDivClass) . '">' : '<div>';
-        $out .= $checkbox . $title . $content . '</div></div>';
-        return $out;
-    }
-
-    /**
-     * Returns a row (with colspan=4) which is a header for a section in the Admin Panel.
-     * It will have a plus/minus icon and a label which is linked so that it submits the form which surrounds the whole Admin Panel when clicked, alterting the TSFE_ADMIN_PANEL[display_' . $pre . '] value
-     * See the functions get*Module
-     *
-     * @param string $sectionSuffix The suffix to the display_ label. Also selects the label from the LOCAL_LANG array.
-     * @return string HTML table row.
-     * @see extGetItem()
-     * @deprecated since TYPO3 v9 - use new AdminPanel API instead
-     */
-    public function extGetHead($sectionSuffix)
-    {
-        trigger_error('since TYPO3 v9 - use new AdminPanel API instead', E_USER_DEPRECATED);
-        return $this->linkSectionHeader($sectionSuffix, $this->extGetLL($sectionSuffix));
-    }
-
-    /**
-     * Wraps a string in a link which will open/close a certain part of the Admin Panel
-     *
-     * @param string $sectionSuffix The code for the display_ label/key
-     * @param string $sectionTitle Title (HTML-escaped)
-     * @param string $className The classname for the <a> tag
-     * @return string $className Linked input string
-     * @see extGetHead()
-     * @deprecated  since TYPO3 v9 - use new AdminPanel API instead
-     */
-    public function linkSectionHeader($sectionSuffix, $sectionTitle, $className = '')
-    {
-        trigger_error('since TYPO3 v9 - use new AdminPanel API instead', E_USER_DEPRECATED);
-        $onclick = 'document.TSFE_ADMIN_PANEL_FORM[' .
-                   GeneralUtility::quoteJSvalue('TSFE_ADMIN_PANEL[display_' . $sectionSuffix . ']') .
-                   '].value=' .
-                   ($this->getBackendUser()->uc['TSFE_adminConfig']['display_' . $sectionSuffix] ? '0' : '1') .
-                   ';document.TSFE_ADMIN_PANEL_FORM.submit();return false;';
-
-        $output = [];
-        $output[] = '<span class="typo3-adminPanel-section-title-identifier"></span>';
-        $output[] = '<a href="javascript:void(0)" onclick="' . htmlspecialchars($onclick) . '">';
-        $output[] = '  ' . $sectionTitle;
-        $output[] = '</a>';
-        $output[] = '<input type="hidden" name="TSFE_ADMIN_PANEL[display_' .
-                    $sectionSuffix .
-                    ']" value="' .
-                    (int)$this->isAdminModuleOpen($sectionSuffix) .
-                    '" />';
-
-        return implode('', $output);
-    }
-}
diff --git a/typo3/sysext/frontend/Classes/View/AdminPanelViewHookInterface.php b/typo3/sysext/frontend/Classes/View/AdminPanelViewHookInterface.php
deleted file mode 100644 (file)
index a789e1e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-namespace TYPO3\CMS\Frontend\View;
-
-/*
- * 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!
- */
-
-/**
- * Interface for classes which hook into AdminPanelView
- *
- * @deprecated since v9 will be removed in v10 - see AdminPanelModuleInterface
- */
-interface AdminPanelViewHookInterface
-{
-    /**
-     * Extend the adminPanel
-     *
-     * @param string $moduleContent Content of the admin panel
-     * @param \TYPO3\CMS\Frontend\View\AdminPanelView $obj The adminPanel object
-     * @return string Returns content of admin panel
-     */
-    public function extendAdminPanel($moduleContent, AdminPanelView $obj);
-}
diff --git a/typo3/sysext/frontend/Resources/Public/Css/adminpanel.css b/typo3/sysext/frontend/Resources/Public/Css/adminpanel.css
deleted file mode 100644 (file)
index 35818bd..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*!
- * 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!
- */
-#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon,.typo3-editPanel-btn .icon,.typo3-editPanel-link .icon{position:relative;display:inline-block;overflow:hidden;white-space:nowrap;vertical-align:-22%}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon img,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon svg,.typo3-editPanel-btn .icon img,.typo3-editPanel-btn .icon svg,.typo3-editPanel-link .icon img,.typo3-editPanel-link .icon svg{display:block;height:100%;width:100%;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon *,.typo3-editPanel-btn .icon *,.typo3-editPanel-link .icon *{display:block;line-height:inherit}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-markup,.typo3-editPanel-btn .icon-markup,.typo3-editPanel-link .icon-markup{position:absolute;display:block;text-align:center;top:0;left:0;right:0;bottom:0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-overlay,.typo3-editPanel-btn .icon-overlay,.typo3-editPanel-link .icon-overlay{position:absolute;bottom:0;right:0;height:68.75%;width:68.75%;text-align:center}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-color,.typo3-editPanel-btn .icon-color,.typo3-editPanel-link .icon-color{fill:currentColor}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-spin .icon-markup,.typo3-editPanel-btn .icon-spin .icon-markup,.typo3-editPanel-link .icon-spin .icon-markup{-webkit-animation:icon-spin 2s infinite linear;animation:icon-spin 2s infinite linear}@-webkit-keyframes icon-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes icon-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-state-disabled .icon-markup,.typo3-editPanel-btn .icon-state-disabled .icon-markup,.typo3-editPanel-link .icon-state-disabled .icon-markup{opacity:.5}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-small,.typo3-editPanel-btn .icon-size-small,.typo3-editPanel-link .icon-size-small{height:16px;width:16px;line-height:16px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-small .icon-unify,.typo3-editPanel-btn .icon-size-small .icon-unify,.typo3-editPanel-link .icon-size-small .icon-unify{line-height:16px;font-size:14px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-small .icon-overlay .icon-unify,.typo3-editPanel-btn .icon-size-small .icon-overlay .icon-unify,.typo3-editPanel-link .icon-size-small .icon-overlay .icon-unify{line-height:10px;font-size:9px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-default,.typo3-editPanel-btn .icon-size-default,.typo3-editPanel-link .icon-size-default{height:32px;width:32px;line-height:32px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-default .icon-unify,.typo3-editPanel-btn .icon-size-default .icon-unify,.typo3-editPanel-link .icon-size-default .icon-unify{line-height:32px;font-size:28px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-default .icon-overlay .icon-unify,.typo3-editPanel-btn .icon-size-default .icon-overlay .icon-unify,.typo3-editPanel-link .icon-size-default .icon-overlay .icon-unify{line-height:20px;font-size:18px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-large,.typo3-editPanel-btn .icon-size-large,.typo3-editPanel-link .icon-size-large{height:48px;width:48px;line-height:48px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-large .icon-unify,.typo3-editPanel-btn .icon-size-large .icon-unify,.typo3-editPanel-link .icon-size-large .icon-unify{line-height:48px;font-size:42px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-size-large .icon-overlay .icon-unify,.typo3-editPanel-btn .icon-size-large .icon-overlay .icon-unify,.typo3-editPanel-link .icon-size-large .icon-overlay .icon-unify{line-height:30px;font-size:26px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-actions-edit-copy-release,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-actions-edit-cut-release,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-dialog-error,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-current,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-permission-denied,.typo3-editPanel-btn .icon-actions-edit-copy-release,.typo3-editPanel-btn .icon-actions-edit-cut-release,.typo3-editPanel-btn .icon-status-dialog-error,.typo3-editPanel-btn .icon-status-status-current,.typo3-editPanel-btn .icon-status-status-permission-denied,.typo3-editPanel-link .icon-actions-edit-copy-release,.typo3-editPanel-link .icon-actions-edit-cut-release,.typo3-editPanel-link .icon-status-dialog-error,.typo3-editPanel-link .icon-status-status-current,.typo3-editPanel-link .icon-status-status-permission-denied{color:#c83c3c}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-sorting-light-asc,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-sorting-light-desc,.typo3-editPanel-btn .icon-status-status-sorting-light-asc,.typo3-editPanel-btn .icon-status-status-sorting-light-desc,.typo3-editPanel-link .icon-status-status-sorting-light-asc,.typo3-editPanel-link .icon-status-status-sorting-light-desc{color:#fff}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-sorting-asc,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-sorting-desc,.typo3-editPanel-btn .icon-status-status-sorting-asc,.typo3-editPanel-btn .icon-status-status-sorting-desc,.typo3-editPanel-link .icon-status-status-sorting-asc,.typo3-editPanel-link .icon-status-status-sorting-desc{color:#737373}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-dialog-information,.typo3-editPanel-btn .icon-status-dialog-information,.typo3-editPanel-link .icon-status-dialog-information{color:#6daae0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-dialog-ok,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-status-permission-granted,.typo3-editPanel-btn .icon-status-dialog-ok,.typo3-editPanel-btn .icon-status-status-permission-granted,.typo3-editPanel-link .icon-status-dialog-ok,.typo3-editPanel-link .icon-status-status-permission-granted{color:#79a548}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-dialog-notification,.typo3-editPanel-btn .icon-status-dialog-notification,.typo3-editPanel-link .icon-status-dialog-notification{color:#333}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .icon-status-dialog-warning,.typo3-editPanel-btn .icon-status-dialog-warning,.typo3-editPanel-link .icon-status-dialog-warning{color:#e8a33d}@font-face{font-family:TYPO3FontAwesome;src:url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.eot?v=4.6.3);src:url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.eot?#iefix&v=4.6.3) format("embedded-opentype"),url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.woff2?v=4.6.3) format("woff2"),url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.woff?v=4.6.3) format("woff"),url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.ttf?v=4.6.3) format("truetype"),url(../../../../backend/Resources/Public/Fonts/FontAwesome/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular) format("svg");font-weight:400;font-style:normal}#TSFE_ADMIN_PANEL_FORM .fa:before,.typo3-editPanel .fa:before,.typo3-feedit-element .fa:before{display:inline-block;font:normal normal normal 14px/1 TYPO3FontAwesome;font-size:15px;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translate(0,0);transform:translate(0,0)}#TSFE_ADMIN_PANEL_FORM .fa-pencil:before,.typo3-editPanel .fa-pencil:before,.typo3-feedit-element .fa-pencil:before{content:"\f040"}#TSFE_ADMIN_PANEL_FORM .fa-angle-up:before,.typo3-editPanel .fa-angle-up:before,.typo3-feedit-element .fa-angle-up:before{content:"\f106"}#TSFE_ADMIN_PANEL_FORM .fa-angle-down:before,.typo3-editPanel .fa-angle-down:before,.typo3-feedit-element .fa-angle-down:before{content:"\f107"}#TSFE_ADMIN_PANEL_FORM .fa-toggle-off:before,.typo3-editPanel .fa-toggle-off:before,.typo3-feedit-element .fa-toggle-off:before{content:"\f204"}#TSFE_ADMIN_PANEL_FORM .fa-toggle-on:before,.typo3-editPanel .fa-toggle-on:before,.typo3-feedit-element .fa-toggle-on:before{content:"\f205"}#TSFE_ADMIN_PANEL_FORM .fa-google-plus-square:before,.typo3-editPanel .fa-google-plus-square:before,.typo3-feedit-element .fa-google-plus-square:before{content:"\f0d4"}#TSFE_ADMIN_PANEL_FORM .fa-trash:before,.typo3-editPanel .fa-trash:before,.typo3-feedit-element .fa-trash:before{content:"\f1f8"}#TSFE_ADMIN_PANEL_FORM .fa-history:before,.typo3-editPanel .fa-history:before,.typo3-feedit-element .fa-history:before{content:"\f1da"}#TSFE_ADMIN_PANEL_FORM .fa-list-alt:before,.typo3-editPanel .fa-list-alt:before,.typo3-feedit-element .fa-list-alt:before{content:"\f022"}#TSFE_ADMIN_PANEL_FORM .fa-plus-square:before,.typo3-editPanel .fa-plus-square:before,.typo3-feedit-element .fa-plus-square:before{content:"\f0fe"}#TSFE_ADMIN_PANEL_FORM .fa-arrows:before,.typo3-editPanel .fa-arrows:before,.typo3-feedit-element .fa-arrows:before{content:"\f047"}#TSFE_ADMIN_PANEL_FORM .fa-exclamation-circle:before,.typo3-editPanel .fa-exclamation-circle:before,.typo3-feedit-element .fa-exclamation-circle:before{content:"\f06a"}#TSFE_ADMIN_PANEL_FORM .fa-exclamation-triangle:before,.typo3-editPanel .fa-exclamation-triangle:before,.typo3-feedit-element .fa-exclamation-triangle:before{content:"\f071"}#TSFE_ADMIN_PANEL_FORM .fa-info-circle:before,.typo3-editPanel .fa-info-circle:before,.typo3-feedit-element .fa-info-circle:before{content:"\f05a"}#TSFE_ADMIN_PANEL_FORM .fa-caret-down:before,.typo3-editPanel .fa-caret-down:before,.typo3-feedit-element .fa-caret-down:before{content:"\f0d7"}#TSFE_ADMIN_PANEL_FORM .fa-caret-up:before,.typo3-editPanel .fa-caret-up:before,.typo3-feedit-element .fa-caret-up:before{content:"\f0d8"}#TSFE_ADMIN_PANEL_FORM .fa-bolt:before,.typo3-editPanel .fa-bolt:before,.typo3-feedit-element .fa-bolt:before{content:"\f0e7"}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title-identifier:before{display:inline-block;font:normal normal normal 14px/1 TYPO3FontAwesome;font-size:15px;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translate(0,0);transform:translate(0,0)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel,.typo3-editPanel{background-color:#fafafa;color:#333;font-family:sans-serif;font-size:12px;line-height:1.35em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel a,.typo3-editPanel a{color:inherit;text-decoration:none}#TSFE_ADMIN_PANEL_FORM{display:block!important;position:fixed;bottom:0;left:0;max-width:100%;max-height:100%;z-index:10002;padding:0;margin:0}#TSFE_ADMIN_PANEL_FORM *{box-sizing:border-box}#TSFE_ADMIN_PANEL_FORM *,#TSFE_ADMIN_PANEL_FORM :active,#TSFE_ADMIN_PANEL_FORM :focus,#TSFE_ADMIN_PANEL_FORM :hover{outline:0}#TSFE_ADMIN_PANEL_FORM :after,#TSFE_ADMIN_PANEL_FORM :before{box-sizing:border-box}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel{border:1px solid #cacaca;max-height:100vh;max-width:100%;min-width:280px;border-left:0;border-bottom:0;border-top-left-radius:2px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelCollapse,#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelEnable{display:none}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelEnable:checked+#typo3AdminPanelCollapse+.typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-enable-enabled{display:inline}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelEnable:checked+#typo3AdminPanelCollapse+.typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-enable-disabled{display:none}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelEnable:checked+#typo3AdminPanelCollapse+.typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse{display:block}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelCollapse:checked+.typo3-adminPanel .typo3-adminPanel-actions,#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelCollapse:checked+.typo3-adminPanel .typo3-adminPanel-body{display:none}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelCollapse:checked+.typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse-enabled{display:inline}#TSFE_ADMIN_PANEL_FORM #typo3AdminPanelCollapse:checked+.typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse-disabled{display:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header{position:relative;background-color:#333;color:#fafafa;padding:1em 3em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-user:before{content:':';margin-right:.5em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-enable{position:absolute;cursor:pointer;top:50%;left:0;padding:1em;-webkit-transform:translate(0,-50%);transform:translate(0,-50%)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse{display:none;left:auto;right:0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-enable-enabled{display:none;color:#79a548}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-enable-disabled{color:#c83c3c}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-header .typo3-adminPanel-header-collapse-enabled{display:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-actions{text-align:right;padding:0 1em .75em;background-color:#333;color:#fafafa}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-body{height:100%;overflow:auto}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-body>.typo3-adminPanel-section-title:first-child{border-top:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title{position:relative;overflow:hidden;border-top:1px solid #bbb;background-color:#eee;padding:.75em 3em .75em 1em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title:hover{background-color:#ddd}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title a{position:relative;display:block;padding:.75em 3em .75em 1em;margin:-.75em -3em -.75em -1em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title-identifier{position:absolute;top:50%;right:0;padding:1em;-webkit-transform:translate(0,-50%);transform:translate(0,-50%)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-title-identifier:before{content:"\f105"}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-open .typo3-adminPanel-section-title-identifier:before{content:"\f107 "}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-section-body{padding:.75em 1em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel label{display:block;font-weight:400;padding:0;margin:0;overflow:hidden}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel input[type=text],#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel select{display:block;width:100%;padding:.5em;border:1px solid #ccc;margin:.5em 0;font-size:inherit}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel input[type=text]:focus,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel input[type=text]:hover,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel select:focus,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel select:hover{border-color:#aaa}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group{margin:1em 0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-checkbox,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-radio{margin:.5em 0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-checkbox label,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-radio label{padding-left:20px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-checkbox input[type=checkbox],#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-checkbox input[type=radio],#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-radio input[type=checkbox],#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-form-group-radio input[type=radio]{float:left;padding:0;margin:1px 0 0 -20px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table-overflow{max-width:100%;margin:1em 0;overflow-x:auto}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table{width:100%;border:1px solid #ccc;border-collapse:collapse;border-spacing:0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table td,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table th{text-align:left;overflow:hidden;position:relative;vertical-align:top;padding:.75em}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table thead tr{background-color:rgba(0,0,0,.15)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table thead td,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table thead th{font-weight:400}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table-cell-content{word-wrap:break-word}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-table-cell-nowrap{white-space:nowrap}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-logRow-highlight{background-color:#fcd3cf}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .stackPointer{color:maroon;vertical-align:top}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn{display:inline-block;margin-bottom:0;padding:6px 8px;border:1px solid transparent;border-radius:0;font-weight:400;line-height:1.5;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn:active,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn:focus,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn:hover{outline:0}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-default{color:#333;background-color:#eee;border-color:#bbb;cursor:pointer}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-default:hover{background-color:#c4c4c4}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-dark{color:#fafafa;background-color:#555;border-color:rgba(0,0,0,.5);cursor:pointer}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-dark:hover{background-color:#444}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-group{position:relative;display:inline-block;vertical-align:middle}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .typo3-adminPanel-btn-group .typo3-adminPanel-btn+.typo3-adminPanel-btn{margin-left:-1px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon{display:inline-block;margin-right:2px;padding:0;height:18px;width:16px;white-space:nowrap;overflow:hidden;vertical-align:middle}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon:after,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon:before{position:absolute;content:'';margin-left:7px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon:before{top:0;height:100%;width:2px;margin-left:7px;border-left:1px dotted #666}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon:after{border-top:1px dotted #666;height:2px;width:8px;margin-top:8px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-jointop:before{top:50%}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-joinbottom:before{height:26px;margin-top:-8px}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-line:after{display:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-blank{display:none}#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-clear:after,#TSFE_ADMIN_PANEL_FORM .typo3-adminPanel .treeline-icon-clear:before{display:none}.typo3-feedit-element{border:1px solid #cacaca;margin:1em 0}.typo3-editPanel{display:block!important;border-top:1px solid #cacaca;padding:.5em}.typo3-editPanel .typo3-editPanel-label{margin-left:1.5em;display:inline-block;vertical-align:middle}.typo3-editPanel .typo3-adminPanel-btn,.typo3-editPanel .typo3-editPanel-btn{display:inline-block!important;margin-bottom:0;padding:6px 8px;line-height:1.5em;border:1px solid transparent;border-radius:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.typo3-editPanel .typo3-adminPanel-btn:active,.typo3-editPanel .typo3-adminPanel-btn:focus,.typo3-editPanel .typo3-adminPanel-btn:hover,.typo3-editPanel .typo3-editPanel-btn:active,.typo3-editPanel .typo3-editPanel-btn:focus,.typo3-editPanel .typo3-editPanel-btn:hover{outline:0}.typo3-editPanel .typo3-adminPanel-btn-default,.typo3-editPanel .typo3-editPanel-btn-default{color:#333;background-color:#eee;border-color:#bbb;cursor:pointer}.typo3-editPanel .typo3-adminPanel-btn-default:hover,.typo3-editPanel .typo3-editPanel-btn-default:hover{background-color:#c4c4c4}.typo3-editPanel .typo3-adminPanel-form-group,.typo3-editPanel .typo3-editPanel-form-group{margin-right:.5em;display:inline-block}.typo3-editPanel .typo3-adminPanel-btn-group,.typo3-editPanel .typo3-editPanel-btn-group{position:relative;display:inline-block;vertical-align:middle}.typo3-editPanel .typo3-adminPanel-btn-group .typo3-adminPanel-btn+.typo3-adminPanel-btn,.typo3-editPanel .typo3-adminPanel-btn-group .typo3-editPanel-btn+.typo3-editPanel-btn,.typo3-editPanel .typo3-editPanel-btn-group .typo3-adminPanel-btn+.typo3-adminPanel-btn,.typo3-editPanel .typo3-editPanel-btn-group .typo3-editPanel-btn+.typo3-editPanel-btn{margin-left:-1px}.typo3-adminPanel-btn,.typo3-editPanel-btn{display:inline-block!important}.typo3-feedit-element-hidden{border-color:#ebc975}.typo3-feedit-element-hidden .typo3-editPanel{border-top-color:#ebc975;background-color:#f8ecce}.typo3-feedit-element-hidden .typo3-editPanel .typo3-editPanel-btn-default{border-color:#e5b848;background-color:#f2dba1}.typo3-feedit-element-hidden .typo3-editPanel .typo3-editPanel-btn-default:hover{background-color:#eed28b}
\ No newline at end of file
diff --git a/typo3/sysext/frontend/Tests/Unit/View/AdminPanelViewTest.php b/typo3/sysext/frontend/Tests/Unit/View/AdminPanelViewTest.php
deleted file mode 100644 (file)
index 0561280..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Frontend\Tests\Unit\View;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Frontend\Tests\Unit\View\Fixtures\AdminPanelDisabledModuleFixture;
-use TYPO3\CMS\Frontend\Tests\Unit\View\Fixtures\AdminPanelEnabledShownOnSubmitInitializeModuleFixture;
-use TYPO3\CMS\Frontend\View\AdminPanelView;
-
-/**
- * Test case
- */
-class AdminPanelViewTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
-{
-    public function setUp()
-    {
-        parent::setUp();
-        $iconFactoryProphecy = $this->prophesize(IconFactory::class);
-        GeneralUtility::addInstance(IconFactory::class, $iconFactoryProphecy->reveal());
-        $beUserProphecy = $this->prophesize(BackendUserAuthentication::class);
-        $GLOBALS['BE_USER'] = $beUserProphecy->reveal();
-    }
-
-    /**
-     * @test
-     */
-    public function initializeCallsOnSubmitIfInputVarsAreSet()
-    {
-        $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['frontend']['adminPanelModules'] = [
-            'fixtureOnSubmit' => [
-                'module' => AdminPanelEnabledShownOnSubmitInitializeModuleFixture::class
-            ]
-        ];
-
-        $postVars = ['preview_showFluidDebug' => '1'];
-        $_GET['TSFE_ADMIN_PANEL'] = $postVars;
-
-        $this->expectExceptionCode('1519997815');
-
-        new AdminPanelView();
-    }
-
-    /**
-     * @test
-     */
-    public function initializeCallsInitializeModulesForEnabledModules()
-    {
-        $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['frontend']['adminPanelModules'] = [
-            'enabledModule' => [
-                'module' => AdminPanelEnabledShownOnSubmitInitializeModuleFixture::class
-            ],
-            'disabledModule' => [
-                'module' => AdminPanelDisabledModuleFixture::class,
-                'before' => ['enabledModule']
-            ]
-        ];
-
-        $this->expectExceptionCode(1519999273);
-        new AdminPanelView();
-    }
-}
diff --git a/typo3/sysext/frontend/Tests/Unit/View/Fixtures/AdminPanelDisabledModuleFixture.php b/typo3/sysext/frontend/Tests/Unit/View/Fixtures/AdminPanelDisabledModuleFixture.php
deleted file mode 100644 (file)
index e93556c..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Frontend\Tests\Unit\View\Fixtures;
-
-/*
- * 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!
- */
-use TYPO3\CMS\Frontend\AdminPanel\AdminPanelModuleInterface;
-
-class AdminPanelDisabledModuleFixture implements AdminPanelModuleInterface
-{
-
-    /**
-     * Additional JavaScript code for this module
-     * (you should only use vanilla JS here, as you cannot
-     * rely on the web site providing a specific framework)
-     *
-     * @return string
-     */
-    public function getAdditionalJavaScriptCode(): string
-    {
-        return '';
-    }
-
-    /**
-     * Module content as rendered HTML
-     *
-     * @return string
-     */
-    public function getContent(): string
-    {
-        return '';
-    }
-
-    /**
-     * Identifier for this module,
-     * for example "preview" or "cache"
-     *
-     * @return string
-     */
-    public function getIdentifier(): string
-    {
-        return '';
-    }
-
-    /**
-     * Module label
-     *
-     * @return string
-     */
-    public function getLabel(): string
-    {
-        return '';
-    }
-
-    /**
-     * Initialize the module - runs early in a TYPO3 request
-     */
-    public function initializeModule(): void
-    {
-        throw new \RuntimeException('I should not be initialized.', 1519999375);
-    }
-
-    /**
-     * Module is enabled
-     * -> should be initialized
-     * A module may be enabled but not shown
-     * -> only the initializeModule() method
-     * will be called
-     *
-     * @return bool
-     */
-    public function isEnabled(): bool
-    {
-        return false;
-    }
-
-    /**
-     * Module is open
-     * -> module is enabled
-     * -> module panel is shown and open
-     *
-     * @return bool
-     */
-    public function isOpen(): bool
-    {
-        return true;
-    }
-
-    /**
-     * Module is shown
-     * -> module is enabled
-     * -> module panel should be displayed
-     *
-     * @return bool
-     */
-    public function isShown(): bool
-    {
-        return true;
-    }
-
-    /**
-     * Executed on saving / submit of the configuration form
-     * Can be used to react to changed settings
-     * (for example: clearing a specific cache)
-     *
-     * @param array $input
-     */
-    public function onSubmit(array $input): void
-    {
-    }
-
-    /**
-     * Does this module need a form submit?
-     *
-     * @return bool
-     */
-    public function showFormSubmitButton(): bool
-    {
-        return true;
-    }
-}
diff --git a/typo3/sysext/frontend/Tests/Unit/View/Fixtures/AdminPanelEnabledShownOnSubmitInitializeModuleFixture.php b/typo3/sysext/frontend/Tests/Unit/View/Fixtures/AdminPanelEnabledShownOnSubmitInitializeModuleFixture.php
deleted file mode 100644 (file)
index 1572fdf..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Frontend\Tests\Unit\View\Fixtures;
-
-/*
- * 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!
- */
-use TYPO3\CMS\Frontend\AdminPanel\AdminPanelModuleInterface;
-
-class AdminPanelEnabledShownOnSubmitInitializeModuleFixture implements AdminPanelModuleInterface
-{
-
-    /**
-     * Additional JavaScript code for this module
-     * (you should only use vanilla JS here, as you cannot
-     * rely on the web site providing a specific framework)
-     *
-     * @return string
-     */
-    public function getAdditionalJavaScriptCode(): string
-    {
-        return '';
-    }
-
-    /**
-     * Module content as rendered HTML
-     *
-     * @return string
-     */
-    public function getContent(): string
-    {
-        return '';
-    }
-
-    /**
-     * Identifier for this module,
-     * for example "preview" or "cache"
-     *
-     * @return string
-     */
-    public function getIdentifier(): string
-    {
-        return '';
-    }
-
-    /**
-     * Module label
-     *
-     * @return string
-     */
-    public function getLabel(): string
-    {
-        return '';
-    }
-
-    /**
-     * Initialize the module - runs early in a TYPO3 request
-     */
-    public function initializeModule(): void
-    {
-        throw new \RuntimeException('initialized.', 1519999273);
-    }
-
-    /**
-     * Module is enabled
-     * -> should be initialized
-     * A module may be enabled but not shown
-     * -> only the initializeModule() method
-     * will be called
-     *
-     * @return bool
-     */
-    public function isEnabled(): bool
-    {
-        return true;
-    }
-
-    /**
-     * Module is open
-     * -> module is enabled
-     * -> module panel is shown and open
-     *
-     * @return bool
-     */
-    public function isOpen(): bool
-    {
-        return true;
-    }
-
-    /**
-     * Module is shown
-     * -> module is enabled
-     * -> module panel should be displayed
-     *
-     * @return bool
-     */
-    public function isShown(): bool
-    {
-        return true;
-    }
-
-    /**
-     * Executed on saving / submit of the configuration form
-     * Can be used to react to changed settings
-     * (for example: clearing a specific cache)
-     *
-     * @param array $input
-     */
-    public function onSubmit(array $input): void
-    {
-        throw new \RuntimeException('Catch me if you can!', 1519997815);
-    }
-
-    /**
-     * Does this module need a form submit?
-     *
-     * @return bool
-     */
-    public function showFormSubmitButton(): bool
-    {
-        return true;
-    }
-}
index be799e4..e0d9561 100644 (file)
@@ -114,26 +114,3 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlHandlers']['front
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
     '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:frontend/Configuration/TSconfig/Page/TCEFORM.txt">'
 );
-
-$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['frontend']['adminPanelModules'] = [
-    'preview' => [
-        'module' => \TYPO3\CMS\Frontend\AdminPanel\PreviewModule::class,
-        'before' => ['cache']
-    ],
-    'cache' => [
-        'module' => \TYPO3\CMS\Frontend\AdminPanel\CacheModule::class,
-        'after' => ['preview']
-    ],
-    'edit' => [
-        'module' => \TYPO3\CMS\Frontend\AdminPanel\EditModule::class,
-        'after' => ['cache']
-    ],
-    'tsdebug' => [
-        'module' => \TYPO3\CMS\Frontend\AdminPanel\TsDebugModule::class,
-        'after' => ['edit']
-    ],
-    'info' => [
-        'module' => \TYPO3\CMS\Frontend\AdminPanel\InfoModule::class,
-        'after' => ['tsdebug']
-    ]
-];