[!!!][TASK] Drop "documentation" extension 85/57385/7
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 26 Jun 2018 20:35:46 +0000 (22:35 +0200)
committerHelmut Hummel <typo3@helhum.io>
Wed, 27 Jun 2018 10:58:04 +0000 (12:58 +0200)
The docs team is working on a new docs.typo3.org rendering
chain that can come with some new long awaited features.
One blocker is the core internal documentation extension
that needs various hard to maintain resources from
docs.typo3.org.

The suggested solution was to drop the backend inline
manual fetching and display and thus obsolete the
extension.

For v8 and below, the 'latest' state of the various
json, xml and zip files the extension relies on, will
be frozen by the docs team to not break the module.

The documentation extension has various flaws, it for
instance tends to download outdated manual versions, the
acceptance within the community is not very high
and people are used to look up latest docs online.

The patch drops ext:documentation from the core to
free up the docs team from maintaining the clumsy
requirements at some point in time entirely.

Resolves: #85398
Releases: master
Change-Id: I4152381c49d3223b2586a742388cdf940aafe983
Reviewed-on: https://review.typo3.org/57385
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Helmut Hummel <typo3@helhum.io>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
38 files changed:
Build/Gruntfile.js
Build/tsconfig.json
composer.json
composer.lock
typo3/sysext/core/Documentation/Changelog/master/Breaking-85398-DropDocumentationExtension.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Acceptance/Backend/Extensionmanager/InstalledExtensionsCest.php
typo3/sysext/documentation/.gitattributes [deleted file]
typo3/sysext/documentation/Classes/Controller/DocumentController.php [deleted file]
typo3/sysext/documentation/Classes/Domain/Model/Document.php [deleted file]
typo3/sysext/documentation/Classes/Domain/Model/DocumentFormat.php [deleted file]
typo3/sysext/documentation/Classes/Domain/Model/DocumentTranslation.php [deleted file]
typo3/sysext/documentation/Classes/Domain/Repository/DocumentRepository.php [deleted file]
typo3/sysext/documentation/Classes/Exception.php [deleted file]
typo3/sysext/documentation/Classes/Exception/Document.php [deleted file]
typo3/sysext/documentation/Classes/Exception/XmlParser.php [deleted file]
typo3/sysext/documentation/Classes/Service/DocumentationService.php [deleted file]
typo3/sysext/documentation/Classes/Slots/ExtensionManager.php [deleted file]
typo3/sysext/documentation/Classes/Utility/MiscUtility.php [deleted file]
typo3/sysext/documentation/Classes/ViewHelpers/FormatsViewHelper.php [deleted file]
typo3/sysext/documentation/Configuration/Backend/AjaxRoutes.php [deleted file]
typo3/sysext/documentation/LICENSE.txt [deleted file]
typo3/sysext/documentation/README.rst [deleted file]
typo3/sysext/documentation/Resources/Private/.htaccess [deleted file]
typo3/sysext/documentation/Resources/Private/Language/locallang.xlf [deleted file]
typo3/sysext/documentation/Resources/Private/Language/locallang_mod.xlf [deleted file]
typo3/sysext/documentation/Resources/Private/Layouts/Default.html [deleted file]
typo3/sysext/documentation/Resources/Private/Templates/Document/Download.html [deleted file]
typo3/sysext/documentation/Resources/Private/Templates/Document/List.html [deleted file]
typo3/sysext/documentation/Resources/Public/Icons/Extension.png [deleted file]
typo3/sysext/documentation/Resources/Public/Icons/module-documentation.svg [deleted file]
typo3/sysext/documentation/Resources/Public/JavaScript/Main.js [deleted file]
typo3/sysext/documentation/Tests/Unit/Domain/Model/DocumentFormatTest.php [deleted file]
typo3/sysext/documentation/Tests/Unit/Domain/Model/DocumentTest.php [deleted file]
typo3/sysext/documentation/Tests/Unit/Domain/Model/DocumentTranslationTest.php [deleted file]
typo3/sysext/documentation/composer.json [deleted file]
typo3/sysext/documentation/ext_emconf.php [deleted file]
typo3/sysext/documentation/ext_localconf.php [deleted file]
typo3/sysext/documentation/ext_tables.php [deleted file]

index 628e332..a2889ed 100644 (file)
@@ -290,7 +290,7 @@ module.exports = function (grunt) {
             src: '<%= paths.t3icons %>module/module-config.svg'
           },
           {
-            dest: '<%= paths.sysext %>documentation/Resources/Public/Icons/module-cshmanual.svg',
+            dest: '<%= paths.sysext %>backend/Resources/Public/Icons/module-cshmanual.svg',
             src: '<%= paths.t3icons %>module/module-cshmanual.svg'
           },
           {
@@ -298,10 +298,6 @@ module.exports = function (grunt) {
             src: '<%= paths.t3icons %>module/module-dbint.svg'
           },
           {
-            dest: '<%= paths.sysext %>documentation/Resources/Public/Icons/module-documentation.svg',
-            src: '<%= paths.t3icons %>module/module-documentation.svg'
-          },
-          {
             dest: '<%= paths.sysext %>extensionmanager/Resources/Public/Icons/module-extensionmanager.svg',
             src: '<%= paths.t3icons %>module/module-extensionmanager.svg'
           },
index 606226b..30bf908 100644 (file)
                 "../typo3/sysext/core/Resources/Public/JavaScript/*",
                 "../typo3/sysext/core/Resources/Private/TypeScript/*"
             ],
-            "TYPO3/CMS/Documentation/*": [
-                "../typo3/sysext/documentation/Resources/Public/JavaScript/*",
-                "../typo3/sysext/documentation/Resources/Private/TypeScript/*"
-            ],
             "TYPO3/CMS/Extensionmanager/*": [
                 "../typo3/sysext/extensionmanager/Resources/Public/JavaScript/*",
                 "../typo3/sysext/extensionmanager/Resources/Private/TypeScript/*"
index d890882..8a2a832 100644 (file)
@@ -85,7 +85,6 @@
                                "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",
                                "typo3/sysext/extbase/Migrations/Code/ClassAliasMap.php",
                                "typo3/sysext/fluid/Migrations/Code/ClassAliasMap.php",
                                "typo3/sysext/info/Migrations/Code/ClassAliasMap.php",
                "typo3/cms-belog": "self.version",
                "typo3/cms-beuser": "self.version",
                "typo3/cms-core": "self.version",
-               "typo3/cms-documentation": "self.version",
                "typo3/cms-extbase": "self.version",
                "typo3/cms-extensionmanager": "self.version",
                "typo3/cms-feedit": "self.version",
                        "TYPO3\\CMS\\Belog\\": "typo3/sysext/belog/Classes/",
                        "TYPO3\\CMS\\Beuser\\": "typo3/sysext/beuser/Classes/",
                        "TYPO3\\CMS\\Core\\": "typo3/sysext/core/Classes/",
-                       "TYPO3\\CMS\\Documentation\\": "typo3/sysext/documentation/Classes/",
                        "TYPO3\\CMS\\Extbase\\": "typo3/sysext/extbase/Classes/",
                        "TYPO3\\CMS\\Extensionmanager\\": "typo3/sysext/extensionmanager/Classes/",
                        "TYPO3\\CMS\\Feedit\\": "typo3/sysext/feedit/Classes/",
                        "TYPO3\\CMS\\Belog\\Tests\\": "typo3/sysext/belog/Tests/",
                        "TYPO3\\CMS\\Beuser\\Tests\\": "typo3/sysext/beuser/Tests/",
                        "TYPO3\\CMS\\Core\\Tests\\": "typo3/sysext/core/Tests/",
-                       "TYPO3\\CMS\\Documentation\\Tests\\": "typo3/sysext/documentation/Tests/",
                        "TYPO3\\CMS\\Extbase\\Tests\\": "typo3/sysext/extbase/Tests/",
                        "TYPO3\\CMS\\Extensionmanager\\Tests\\": "typo3/sysext/extensionmanager/Tests/",
                        "TYPO3\\CMS\\Felogin\\Tests\\": "typo3/sysext/felogin/Tests/",
index 6280149..554b2cc 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "683d28133ccb5f63b5fae9553b9eb8ef",
+    "content-hash": "f62eab6aa1190b064eca1d92cf446797",
     "packages": [
         {
             "name": "cogpowered/finediff",
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-85398-DropDocumentationExtension.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-85398-DropDocumentationExtension.rst
new file mode 100644 (file)
index 0000000..cb4fd47
--- /dev/null
@@ -0,0 +1,54 @@
+.. include:: ../../Includes.txt
+
+===============================================
+Breaking: #85398 - Drop documentation extension
+===============================================
+
+See :issue:`85398`
+
+Description
+===========
+
+Fetching and rendering extension and core manuals directly within
+the backend using the documentation extension has been dropped
+from the TYPO3 backend.
+
+The module never found broad acceptance and usage in the community,
+had various hard to resolve flaws and has been a maintenance burden
+for the documentation team ever since.
+
+
+Impact
+======
+
+The Documentation module does not exist anymore and cannot be used
+anymore to display manuals in the TYPO3 backend.
+
+The previously required extension "documentation" is not available anymore.
+
+New installations do not have the `documentation` extension installed by default.
+
+
+Affected Installations
+======================
+
+Every TYPO3 instance.
+
+
+Migration
+=========
+
+Current documentation of core functionality, core extensions and
+community extensions can always be found on docs_ directly.
+
+Flush all TYPO3 Core Caches to ensure that :php:`PackageStates.php` is rebuilt
+without the documentation extension.
+
+For composer installations, ensure that the dependency to `typo3/cms-documentation` is removed.
+
+Extensions authors need to ensure that dependencies to `EXT:documentation` are removed, if
+they existed before.
+
+.. _docs: https://docs.typo3.org
+
+.. index:: NotScanned
\ No newline at end of file
index a24b417..8f1cfd0 100644 (file)
@@ -45,13 +45,13 @@ class InstalledExtensionsCest
         $I->canSeeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', [10, 100]);
 
         // Fill extension search field
-        $I->fillField('Tx_Extensionmanager_extensionkey', 'documentation');
+        $I->fillField('Tx_Extensionmanager_extensionkey', 'backend');
 
         // see 2 rows. 1 for the header and one for the result
         $I->canSeeNumberOfElements('#typo3-extension-list tbody tr[role="row"]', 1);
 
         // Look for extension key
-        $I->canSee('documentation', '#typo3-extension-list tbody tr[role="row"] td');
+        $I->canSee('backend', '#typo3-extension-list tbody tr[role="row"] td');
 
         // unset the filter
         $I->waitForElementVisible('#Tx_Extensionmanager_extensionkey ~button.close', 10);
diff --git a/typo3/sysext/documentation/.gitattributes b/typo3/sysext/documentation/.gitattributes
deleted file mode 100644 (file)
index 79ede15..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/.gitattributes export-ignore
-/Tests/ export-ignore
diff --git a/typo3/sysext/documentation/Classes/Controller/DocumentController.php b/typo3/sysext/documentation/Classes/Controller/DocumentController.php
deleted file mode 100644 (file)
index 2d3999c..0000000
+++ /dev/null
@@ -1,308 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Controller;
-
-/*
- * 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 Psr\Http\Message\ResponseInterface;
-use Psr\Http\Message\ServerRequestInterface;
-use TYPO3\CMS\Backend\View\BackendTemplateView;
-use TYPO3\CMS\Core\Core\Environment;
-use TYPO3\CMS\Core\Http\JsonResponse;
-use TYPO3\CMS\Core\Localization\LanguageService;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Page\PageRenderer;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Documentation\Domain\Repository\DocumentRepository;
-use TYPO3\CMS\Documentation\Service\DocumentationService;
-use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
-use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
-use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
-use TYPO3\CMS\Extbase\SignalSlot\Dispatcher;
-use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
-
-/**
- * Main controller of the Documentation module.
- */
-class DocumentController extends ActionController
-{
-    /**
-     * @var DocumentRepository
-     */
-    protected $documentRepository;
-
-    /**
-     * @var DocumentationService
-     */
-    protected $documentationService;
-
-    /**
-     * @var Dispatcher
-     */
-    protected $signalSlotDispatcher;
-
-    /**
-     * Backend Template Container
-     *
-     * @var BackendTemplateView
-     */
-    protected $defaultViewObjectName = BackendTemplateView::class;
-
-    /**
-     * BackendTemplateContainer
-     *
-     * @var BackendTemplateView
-     */
-    protected $view;
-
-    /**
-     * Set up the doc header properly here
-     *
-     * @param ViewInterface $view
-     */
-    protected function initializeView(ViewInterface $view)
-    {
-        if ($view instanceof BackendTemplateView) {
-            /** @var BackendTemplateView $view */
-            parent::initializeView($view);
-            $view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation([]);
-            $uriBuilder = $this->objectManager->get(UriBuilder::class);
-            $uriBuilder->setRequest($this->request);
-
-            $this->view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Documentation/Main');
-            $menu = $this->view->getModuleTemplate()->getDocHeaderComponent()->getMenuRegistry()->makeMenu();
-            $menu->setIdentifier('DocumentationModuleMenu');
-
-            $isListActive = $this->request->getControllerActionName() === 'list' ? true : false;
-            $uri = $uriBuilder->reset()->uriFor('list', [], 'Document');
-            $listMenuItem = $menu->makeMenuItem()
-                ->setTitle($this->getLanguageService()
-                    ->sL('LLL:EXT:documentation/Resources/Private/Language/locallang.xlf:showDocumentation'))
-                ->setHref($uri)
-                ->setActive($isListActive);
-            $menu->addMenuItem($listMenuItem);
-
-            if ($this->getBackendUser()->isAdmin()) {
-                $isDownloadActive = $this->request->getControllerActionName() ===
-                'download' ? true : false;
-                $uri =
-                    $uriBuilder->reset()->uriFor('download', [], 'Document');
-                $downloadMenuItem = $menu->makeMenuItem()
-                    ->setTitle($this->getLanguageService()
-                        ->sL('LLL:EXT:documentation/Resources/Private/Language/locallang.xlf:downloadDocumentation'))
-                    ->setHref($uri)
-                    ->setActive($isDownloadActive);
-                $menu->addMenuItem($downloadMenuItem);
-            }
-
-            $this->view->getModuleTemplate()->getDocHeaderComponent()->getMenuRegistry()->addMenu($menu);
-            $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
-        }
-    }
-
-    /**
-     * @param DocumentRepository $documentRepository
-     */
-    public function injectDocumentRepository(DocumentRepository $documentRepository)
-    {
-        $this->documentRepository = $documentRepository;
-    }
-
-    /**
-     * @param DocumentationService $documentationService
-     */
-    public function injectDocumentationService(DocumentationService $documentationService)
-    {
-        $this->documentationService = $documentationService;
-    }
-
-    /**
-     * Lists the available documents.
-     */
-    public function listAction()
-    {
-        $this->view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation([]);
-
-        $documents = $this->getDocuments();
-
-        // Filter documents to be shown for current user
-        $userTsConfig = $this->getBackendUser()->getTSConfig();
-        $hideDocuments = GeneralUtility::trimExplode(',', $userTsConfig['mod.']['help_DocumentationDocumentation.']['documents.']['hide'] ?? '', true);
-        if (!empty($hideDocuments)) {
-            $documents = array_diff_key($documents, array_flip($hideDocuments));
-        }
-        $showDocuments = GeneralUtility::trimExplode(',', $userTsConfig['mod.']['help_DocumentationDocumentation.']['documents.']['show'] ?? '', true);
-        if (!empty($showDocuments)) {
-            $documents = array_intersect_key($documents, array_flip($showDocuments));
-        }
-
-        $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
-        $pageRenderer->addInlineLanguageLabelFile('EXT:documentation/Resources/Private/Language/locallang.xlf');
-        $pageRenderer->loadRequireJsModule('TYPO3/CMS/Documentation/Main');
-
-        $this->view->assign('documents', $documents);
-    }
-
-    /**
-     * Delete documentation with given packageKey
-     *
-     * @param ServerRequestInterface $request
-     * @return ResponseInterface
-     */
-    public function deleteAction(ServerRequestInterface $request): ResponseInterface
-    {
-        $basePath = 'typo3conf/Documentation/';
-        $packageKey = $request->getParsedBody();
-        $isDirDeleted = GeneralUtility::rmdir(Environment::getPublicPath() . '/' . $basePath . $packageKey['documentationKey'], true);
-        if (!$isDirDeleted) {
-            $this->addFlashMessage(LocalizationUtility::translate('deleteFailed', 'Documentation'), '', FlashMessage::ERROR);
-        }
-        return new JsonResponse([$isDirDeleted]);
-    }
-
-    /**
-     * Returns available documents.
-     *
-     * @return \TYPO3\CMS\Documentation\Domain\Model\Document[]
-     * @api
-     */
-    public function getDocuments()
-    {
-        $language =  $this->getBackendUser()->uc['lang'] ?: 'default';
-        $documents = $this->documentRepository->findByLanguage($language);
-
-        $documents = $this->emitAfterInitializeDocumentsSignal($language, $documents);
-
-        return $documents;
-    }
-
-    /**
-     * Emits a signal after the documents are initialized
-     *
-     * @param string $language
-     * @param \TYPO3\CMS\Documentation\Domain\Model\Document[] $documents
-     * @return \TYPO3\CMS\Documentation\Domain\Model\Document[]
-     */
-    protected function emitAfterInitializeDocumentsSignal($language, array $documents)
-    {
-        $this->signalSlotDispatcher->dispatch(
-            __CLASS__,
-            'afterInitializeDocuments',
-            [
-                $language,
-                &$documents,
-            ]
-        );
-        return $documents;
-    }
-
-    /**
-     * Shows documents to be downloaded/fetched from a remote location.
-     */
-    public function downloadAction()
-    {
-        // This action is reserved for admin users. Redirect to default view if not.
-        if (!$this->getBackendUser()->isAdmin()) {
-            $this->redirect('list');
-        }
-
-        // Retrieve the list of official documents
-        $documents = $this->documentationService->getOfficialDocuments();
-
-        // Merge with the list of local extensions
-        $extensions = $this->documentationService->getLocalExtensions();
-        $allDocuments = array_merge($documents, $extensions);
-
-        $this->view->assign('documents', $allDocuments);
-    }
-
-    /**
-     * Fetches a document from a remote URL.
-     *
-     * @param string $url
-     * @param string $key
-     * @param string $version
-     */
-    public function fetchAction($url, $key, $version = null)
-    {
-        // This action is reserved for admin users. Redirect to default view if not.
-        if (!$this->getBackendUser()->isAdmin()) {
-            $this->redirect('list');
-        }
-
-        $language = $this->getBackendUser()->uc['lang'] ?: 'default';
-        try {
-            $result = $this->documentationService->fetchNearestDocument($url, $key, $version ?: 'latest', $language);
-            if ($result) {
-                $this->addFlashMessage(
-                    LocalizationUtility::translate(
-                        'downloadSucceeded',
-                        'documentation'
-                    ),
-                    '',
-                    FlashMessage::OK
-                );
-            } else {
-                $this->addFlashMessage(
-                    LocalizationUtility::translate(
-                        'downloadFailedNoArchive',
-                        'documentation'
-                    ),
-                    LocalizationUtility::translate(
-                        'downloadFailed',
-                        'documentation'
-                    ),
-                    FlashMessage::ERROR
-                );
-            }
-        } catch (\Exception $e) {
-            $this->addFlashMessage(
-                LocalizationUtility::translate(
-                    'downloadFailedDetails',
-                    'documentation',
-                    [
-                        $key,
-                        $e->getMessage(),
-                        $e->getCode()
-                    ]
-                ),
-                LocalizationUtility::translate(
-                    'downloadFailed',
-                    'documentation'
-                ),
-                FlashMessage::ERROR
-            );
-        }
-        $this->redirect('download');
-    }
-
-    /**
-     * Get backend user
-     *
-     * @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
-     */
-    protected function getBackendUser()
-    {
-        return $GLOBALS['BE_USER'];
-    }
-
-    /**
-     * Returns the LanguageService
-     *
-     * @return LanguageService
-     */
-    protected function getLanguageService()
-    {
-        return $GLOBALS['LANG'];
-    }
-}
diff --git a/typo3/sysext/documentation/Classes/Domain/Model/Document.php b/typo3/sysext/documentation/Classes/Domain/Model/Document.php
deleted file mode 100644 (file)
index 723304c..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Domain\Model;
-
-/*
- * 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\Extbase\Annotation as Extbase;
-
-/**
- * An extension helper model to be used in ext:documentation context
- */
-class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
-{
-    /**
-     * packageKey
-     *
-     * @var string
-     * @Extbase\Validate("NotEmpty")
-     */
-    protected $packageKey;
-
-    /**
-     * extensionKey
-     *
-     * @var string
-     * @Extbase\Validate("NotEmpty")
-     */
-    protected $extensionKey;
-
-    /**
-     * icon
-     *
-     * @var string
-     */
-    protected $icon;
-
-    /**
-     * translations
-     *
-     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation>
-     */
-    protected $translations;
-
-    /**
-     * Default constructor.
-     */
-    public function __construct()
-    {
-        // Do not remove the next line: It would break the functionality
-        $this->initStorageObjects();
-    }
-
-    /**
-     * Initializes all ObjectStorage properties.
-     */
-    protected function initStorageObjects()
-    {
-        /**
-         * Do not modify this method!
-         * It will be rewritten on each save in the extension builder
-         * You may modify the constructor of this class instead
-         */
-        $this->translations = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-    }
-
-    /**
-     * Returns the package key.
-     *
-     * @return string $packageKey
-     */
-    public function getPackageKey()
-    {
-        return $this->packageKey;
-    }
-
-    /**
-     * Sets the package key.
-     *
-     * @param string $packageKey
-     * @return Document
-     */
-    public function setPackageKey($packageKey)
-    {
-        $this->packageKey = $packageKey;
-        return $this;
-    }
-
-    /**
-     * Returns the extension key.
-     *
-     * @return string $extensionKey
-     */
-    public function getExtensionKey()
-    {
-        return $this->extensionKey;
-    }
-
-    /**
-     * Sets the extension key.
-     *
-     * @param string $extensionKey
-     * @return Document
-     */
-    public function setExtensionKey($extensionKey)
-    {
-        $this->extensionKey = $extensionKey;
-        return $this;
-    }
-
-    /**
-     * Returns the icon.
-     *
-     * @return string $icon
-     */
-    public function getIcon()
-    {
-        return $this->icon;
-    }
-
-    /**
-     * Sets the icon.
-     *
-     * @param string $icon
-     * @return Document
-     */
-    public function setIcon($icon)
-    {
-        $this->icon = $icon;
-        return $this;
-    }
-
-    /**
-     * Adds a document translation.
-     *
-     * @param \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translation
-     * @return Document
-     */
-    public function addTranslation(\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translation)
-    {
-        $this->translations->attach($translation);
-        return $this;
-    }
-
-    /**
-     * Removes a document translation.
-     *
-     * @param \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translationToRemove The DocumentTranslation to be removed
-     * @return Document
-     */
-    public function removeTranslation(\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translationToRemove)
-    {
-        $this->translations->detach($translationToRemove);
-        return $this;
-    }
-
-    /**
-     * Returns the translations.
-     *
-     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation> $translations
-     */
-    public function getTranslations()
-    {
-        return $this->translations;
-    }
-
-    /**
-     * Sets the translations.
-     *
-     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation> $translations
-     * @return Document
-     */
-    public function setTranslations(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $translations)
-    {
-        $this->translations = $translations;
-        return $this;
-    }
-}
diff --git a/typo3/sysext/documentation/Classes/Domain/Model/DocumentFormat.php b/typo3/sysext/documentation/Classes/Domain/Model/DocumentFormat.php
deleted file mode 100644 (file)
index fbfeb1f..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Domain\Model;
-
-/*
- * 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\Extbase\Annotation as Extbase;
-
-/**
- * An extension helper model to be used in ext:documentation context
- */
-class DocumentFormat extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
-{
-    /**
-     * format
-     *
-     * @var string
-     * @Extbase\Validate("NotEmpty")
-     */
-    protected $format;
-
-    /**
-     * path
-     *
-     * @var string
-     * @Extbase\Validate("NotEmpty")
-     */
-    protected $path;
-
-    /**
-     * Returns the format.
-     *
-     * @return string $format
-     */
-    public function getFormat()
-    {
-        return $this->format;
-    }
-
-    /**
-     * Sets the format.
-     *
-     * @param string $format
-     * @return DocumentFormat
-     */
-    public function setFormat($format)
-    {
-        $this->format = $format;
-        return $this;
-    }
-
-    /**
-     * Returns the path.
-     *
-     * @return string $path
-     */
-    public function getPath()
-    {
-        return $this->path;
-    }
-
-    /**
-     * Sets the path.
-     *
-     * @param string $path
-     * @return DocumentFormat
-     */
-    public function setPath($path)
-    {
-        $this->path = $path;
-        return $this;
-    }
-}
diff --git a/typo3/sysext/documentation/Classes/Domain/Model/DocumentTranslation.php b/typo3/sysext/documentation/Classes/Domain/Model/DocumentTranslation.php
deleted file mode 100644 (file)
index 3989e74..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Domain\Model;
-
-/*
- * 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\Extbase\Annotation as Extbase;
-
-/**
- * An extension helper model to be used in ext:documentation context
- */
-class DocumentTranslation extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
-{
-    /**
-     * language
-     * 2 char language identifier (or "" for default)
-     *
-     * @var string
-     * @Extbase\Validate("NotEmpty")
-     */
-    protected $language;
-
-    /**
-     * title
-     *
-     * @var string
-     */
-    protected $title;
-
-    /**
-     * description
-     *
-     * @var string
-     */
-    protected $description;
-
-    /**
-     * formats
-     *
-     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat>
-     */
-    protected $formats;
-
-    /**
-     * Default constructor.
-     */
-    public function __construct()
-    {
-        // Do not remove the next line: It would break the functionality
-        $this->initStorageObjects();
-    }
-
-    /**
-     * Initializes all ObjectStorage properties.
-     */
-    protected function initStorageObjects()
-    {
-        /**
-         * Do not modify this method!
-         * It will be rewritten on each save in the extension builder
-         * You may modify the constructor of this class instead
-         */
-        $this->formats = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-    }
-
-    /**
-     * Returns the language.
-     *
-     * @return string $language
-     */
-    public function getLanguage()
-    {
-        return $this->language;
-    }
-
-    /**
-     * Sets the language.
-     *
-     * @param string $language
-     * @return DocumentTranslation
-     */
-    public function setLanguage($language)
-    {
-        $this->language = $language;
-        return $this;
-    }
-
-    /**
-     * Returns the title.
-     *
-     * @return string $title
-     */
-    public function getTitle()
-    {
-        return $this->title;
-    }
-
-    /**
-     * Sets the title.
-     *
-     * @param string $title
-     * @return DocumentTranslation
-     */
-    public function setTitle($title)
-    {
-        $this->title = $title;
-        return $this;
-    }
-
-    /**
-     * Returns the description.
-     *
-     * @return string $description
-     */
-    public function getDescription()
-    {
-        return $this->description;
-    }
-
-    /**
-     * Sets the description.
-     *
-     * @param string $description
-     * @return DocumentTranslation
-     */
-    public function setDescription($description)
-    {
-        $this->description = $description;
-        return $this;
-    }
-
-    /**
-     * Adds a documentation format.
-     *
-     * @param \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $format
-     * @return DocumentTranslation
-     */
-    public function addFormat(\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $format)
-    {
-        $this->formats->attach($format);
-        return $this;
-    }
-
-    /**
-     * Removes a documentation format.
-     *
-     * @param \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $formatToRemove The DocumentFormat to be removed
-     * @return DocumentTranslation
-     */
-    public function removeFormat(\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $formatToRemove)
-    {
-        $this->formats->detach($formatToRemove);
-        return $this;
-    }
-
-    /**
-     * Returns the formats.
-     *
-     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat> $formats
-     */
-    public function getFormats()
-    {
-        return $this->formats;
-    }
-
-    /**
-     * Sets the formats.
-     *
-     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat> $formats
-     * @return DocumentTranslation
-     */
-    public function setFormats(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $formats)
-    {
-        $this->formats = $formats;
-        return $this;
-    }
-}
diff --git a/typo3/sysext/documentation/Classes/Domain/Repository/DocumentRepository.php b/typo3/sysext/documentation/Classes/Domain/Repository/DocumentRepository.php
deleted file mode 100644 (file)
index b39429d..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Domain\Repository;
-
-/*
- * 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\Core\Environment;
-use TYPO3\CMS\Core\Localization\Locales;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\PathUtility;
-use TYPO3\CMS\Documentation\Domain\Model\Document;
-use TYPO3\CMS\Documentation\Domain\Model\DocumentFormat;
-use TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation;
-use TYPO3\CMS\Documentation\Utility\MiscUtility;
-use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
-use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
-
-/**
- * An extension helper repository to be used in ext:documentation context
- */
-class DocumentRepository
-{
-    /**
-     * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-     */
-    protected $objectManager;
-
-    /**
-     * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
-     */
-    public function injectObjectManager(ObjectManagerInterface $objectManager)
-    {
-        $this->objectManager = $objectManager;
-    }
-
-    /**
-     * Finds all documents.
-     *
-     * @return \TYPO3\CMS\Documentation\Domain\Model\Document[]
-     */
-    public function findAll()
-    {
-        $documents = $this->findSphinxDocuments();
-        $openOfficeDocuments = $this->findOpenOfficeDocuments();
-
-        // Add OpenOffice documents if there is not already an existing, non OpenOffice version
-        foreach ($openOfficeDocuments as $documentKey => $document) {
-            if (!isset($documents[$documentKey])) {
-                $documents[$documentKey] = $document;
-            }
-        }
-
-        return $documents;
-    }
-
-    /**
-     * Finds documents by language, always falls back to 'default' (English).
-     *
-     * @param string $language
-     * @return \TYPO3\CMS\Documentation\Domain\Model\Document[]
-     */
-    public function findByLanguage($language)
-    {
-        $allDocuments = $this->findAll();
-
-        // Initialize the dependency of languages
-        $languageDependencies = [];
-        /** @var $locales \TYPO3\CMS\Core\Localization\Locales */
-        $locales = GeneralUtility::makeInstance(Locales::class);
-        // Language is found. Configure it:
-        $shortLanguage = $language;
-        if (!in_array($shortLanguage, $locales->getLocales()) && strpos($shortLanguage, '_') !== false) {
-            list($shortLanguage, $_) = explode('_', $shortLanguage);
-        }
-        if (in_array($shortLanguage, $locales->getLocales())) {
-            $languageDependencies[] = $language;
-            if ($language !== $shortLanguage) {
-                $languageDependencies[] = $shortLanguage;
-            }
-            foreach ($locales->getLocaleDependencies($shortLanguage) as $languageDependency) {
-                $languageDependencies[] = $languageDependency;
-            }
-        }
-        if ($language !== 'default') {
-            $languageDependencies[] = 'default';
-        }
-
-        foreach ($allDocuments as $document) {
-            // Remove every unwanted translation
-            $selectedTranslation = null;
-            $highestPriorityLanguageIndex = count($languageDependencies);
-
-            $translations = $document->getTranslations();
-            foreach ($translations as $translation) {
-                $languageIndex = array_search($translation->getLanguage(), $languageDependencies);
-                if ($languageIndex !== false) {
-                    if ($languageIndex < $highestPriorityLanguageIndex) {
-                        $selectedTranslation = $translation;
-                        $highestPriorityLanguageIndex = $languageIndex;
-                    }
-                } else {
-                    // No exact translation found, perhaps another locale would fit as well. E.g., when requesting
-                    // a documentation as fr_CA but only fr_FR exists
-                    if (strpos($translation->getLanguage(), '_') !== false) {
-                        list($translationLanguage, $_) = explode('_', $translation->getLanguage());
-                        $languageIndex = array_search($translationLanguage, $languageDependencies);
-                        if ($languageIndex !== false && $languageIndex < $highestPriorityLanguageIndex) {
-                            $selectedTranslation = $translation;
-                            $highestPriorityLanguageIndex = $languageIndex;
-                        }
-                    }
-                }
-            }
-
-            $newTranslations = new ObjectStorage();
-            $document->setTranslations($newTranslations);
-            if ($selectedTranslation !== null) {
-                $document->addTranslation($selectedTranslation);
-            }
-        }
-
-        return $allDocuments;
-    }
-
-    /**
-     * Retrieves Sphinx documents.
-     *
-     * @return array
-     */
-    protected function findSphinxDocuments()
-    {
-        $basePath = 'typo3conf/Documentation/';
-
-        $documents = [];
-        $documentKeys = GeneralUtility::get_dirs(Environment::getPublicPath() . '/' . $basePath);
-        // Early return in case no document keys were found
-        if (!is_array($documentKeys)) {
-            return $documents;
-        }
-
-        foreach ($documentKeys as $documentKey) {
-            $icon = MiscUtility::getIcon($documentKey);
-
-            /** @var \TYPO3\CMS\Documentation\Domain\Model\Document $document */
-            $document = $this->objectManager->get(Document::class)
-                ->setPackageKey($documentKey)
-                ->setIcon($icon);
-
-            $languagePath = $basePath . $documentKey . '/';
-            $languages = GeneralUtility::get_dirs(Environment::getPublicPath() . '/' . $languagePath);
-            foreach ($languages as $language) {
-                $metadata = $this->getMetadata($documentKey, $language);
-                if (!empty($metadata['extensionKey'])) {
-                    $document->setExtensionKey($metadata['extensionKey']);
-                }
-
-                /** @var \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $documentTranslation */
-                $documentTranslation = $this->objectManager->get(DocumentTranslation::class)
-                    ->setLanguage($language)
-                    ->setTitle($metadata['title'])
-                    ->setDescription($metadata['description']);
-
-                $formatPath = $languagePath . $language . '/';
-                $formats = GeneralUtility::get_dirs(Environment::getPublicPath() . '/' . $formatPath);
-                foreach ($formats as $format) {
-                    $documentFile = '';
-                    switch ($format) {
-                        case 'html':
-                            // Try to find a valid index file
-                            $indexFiles = ['Index.html', 'index.html', 'index.htm'];
-                            foreach ($indexFiles as $indexFile) {
-                                if (file_exists(Environment::getPublicPath() . '/' . $formatPath . $format . '/' . $indexFile)) {
-                                    $documentFile = $indexFile;
-                                    break;
-                                }
-                            }
-                            break;
-                        case 'pdf':
-                            // Retrieve first PDF
-                            $files = GeneralUtility::getFilesInDir(Environment::getPublicPath() . '/' . $formatPath . $format, 'pdf');
-                            if (is_array($files) && !empty($files)) {
-                                $documentFile = current($files);
-                            }
-                            break;
-                    }
-                    if (!empty($documentFile)) {
-                        /** @var \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $documentFormat */
-                        $documentFormat = $this->objectManager->get(DocumentFormat::class)
-                            ->setFormat($format)
-                            ->setPath($formatPath . $format . '/' . $documentFile);
-
-                        $documentTranslation->addFormat($documentFormat);
-                    }
-                }
-
-                if (!empty($documentTranslation->getFormats())) {
-                    $document->addTranslation($documentTranslation);
-                    $documents[$documentKey] = $document;
-                }
-            }
-        }
-
-        return $documents;
-    }
-
-    /**
-     * Retrieves OpenOffice documents (manual.sxw).
-     *
-     * @return array
-     */
-    protected function findOpenOfficeDocuments()
-    {
-        $documents = [];
-        $language = 'default';
-
-        foreach (array_keys($GLOBALS['TYPO3_LOADED_EXT']) as $extensionKey) {
-            $path = GeneralUtility::getFileAbsFileName('EXT:' . $extensionKey . '/doc/');
-            if (is_file($path . 'manual.sxw')) {
-                $documentKey = 'typo3cms.extensions.' . $extensionKey;
-                $icon = MiscUtility::getIcon($documentKey);
-
-                /** @var \TYPO3\CMS\Documentation\Domain\Model\Document $document */
-                $document = $this->objectManager->get(Document::class)
-                    ->setPackageKey($documentKey)
-                    ->setExtensionKey($extensionKey)
-                    ->setIcon($icon);
-
-                $metadata = $this->getMetadata($documentKey, $language);
-                /** @var \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $documentTranslation */
-                $documentTranslation = $this->objectManager->get(DocumentTranslation::class)
-                    ->setLanguage($language)
-                    ->setTitle($metadata['title'])
-                    ->setDescription($metadata['description']);
-
-                /** @var \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $documentFormat */
-                $documentFormat = $this->objectManager->get(DocumentFormat::class)
-                    ->setFormat('sxw')
-                    ->setPath(PathUtility::stripPathSitePrefix($path . 'manual.sxw'));
-
-                $documentTranslation->addFormat($documentFormat);
-                $document->addTranslation($documentTranslation);
-                $documents[$documentKey] = $document;
-            }
-        }
-
-        return $documents;
-    }
-
-    /**
-     * Returns metadata associated to a given document key.
-     *
-     * @param string $documentKey
-     * @param string $language
-     * @return array
-     */
-    protected function getMetadata($documentKey, $language)
-    {
-        $documentPath = Environment::getPublicPath() . '/typo3conf/Documentation/' . $documentKey . '/' . $language . '/';
-        $metadata = [
-            'title' => $documentKey,
-            'description' => '',
-        ];
-        if (GeneralUtility::isFirstPartOfStr($documentKey, 'typo3cms.extensions.')) {
-            $extensionKey = substr($documentKey, 20);
-            if (ExtensionManagementUtility::isLoaded($extensionKey)) {
-                $metadata = MiscUtility::getExtensionMetaData($extensionKey);
-            }
-        } elseif (is_file($documentPath . 'composer.json')) {
-            $info = json_decode(file_get_contents($documentPath . 'composer.json'), true);
-            if (is_array($info)) {
-                $metadata['title'] = $info['name'];
-                $metadata['description'] = $info['description'];
-            }
-        }
-        return $metadata;
-    }
-}
diff --git a/typo3/sysext/documentation/Classes/Exception.php b/typo3/sysext/documentation/Classes/Exception.php
deleted file mode 100644 (file)
index 54e47ed..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation;
-
-/*
- * 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\Exception as CoreException;
-
-/**
- * Generic Documentation exception
- */
-class Exception extends CoreException
-{
-}
diff --git a/typo3/sysext/documentation/Classes/Exception/Document.php b/typo3/sysext/documentation/Classes/Exception/Document.php
deleted file mode 100644 (file)
index 8027847..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Exception;
-
-/*
- * 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\Documentation\Exception;
-
-/**
- * An exception when something is wrong within the document
- */
-class Document extends Exception
-{
-}
diff --git a/typo3/sysext/documentation/Classes/Exception/XmlParser.php b/typo3/sysext/documentation/Classes/Exception/XmlParser.php
deleted file mode 100644 (file)
index 2654c22..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Exception;
-
-/*
- * 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\Documentation\Exception;
-
-/**
- * An exception when something is wrong within an XML file
- */
-class XmlParser extends Exception
-{
-}
diff --git a/typo3/sysext/documentation/Classes/Service/DocumentationService.php b/typo3/sysext/documentation/Classes/Service/DocumentationService.php
deleted file mode 100644 (file)
index c6dc87f..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Service;
-
-/*
- * 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\Core\Environment;
-use TYPO3\CMS\Core\Http\RequestFactory;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Documentation\Exception\Document;
-use TYPO3\CMS\Documentation\Exception\XmlParser;
-use TYPO3\CMS\Documentation\Utility\MiscUtility;
-
-/**
- * Service class to connect to docs.typo3.org.
- */
-class DocumentationService
-{
-    /**
-     * Returns the list of official documents on docs.typo3.org.
-     *
-     * @return array
-     */
-    public function getOfficialDocuments()
-    {
-        $documents = [];
-
-        $json = GeneralUtility::getUrl('https://docs.typo3.org/typo3cms/documents.json');
-        if ($json) {
-            $documents = json_decode($json, true);
-            foreach ($documents as &$document) {
-                $document['icon'] = MiscUtility::getIcon($document['key']);
-            }
-
-            // Cache file locally to be able to create a composer.json file when fetching a document
-            $absoluteCacheFilename = Environment::getVarPath() . '/transient/documents.json';
-            GeneralUtility::writeFileToTypo3tempDir($absoluteCacheFilename, $json);
-        }
-        return $documents;
-    }
-
-    /**
-     * Returns the list of local extensions.
-     *
-     * @return array
-     */
-    public function getLocalExtensions()
-    {
-        $documents = [];
-
-        foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $extensionKey => $extensionData) {
-            $absoluteExtensionPath = ExtensionManagementUtility::extPath($extensionKey);
-            if (is_file($absoluteExtensionPath . 'README.rst') || is_file($absoluteExtensionPath . 'Documentation' . DIRECTORY_SEPARATOR . 'Index.rst')) {
-                $metadata = MiscUtility::getExtensionMetaData($extensionKey);
-                if ($extensionData['type'] === 'S') {
-                    $version = TYPO3_branch;
-                } else {
-                    $version = substr($metadata['release'], -4) === '-dev' ? 'latest' : $metadata['release'];
-                }
-
-                $documentKey = 'typo3cms.extensions.' . $extensionKey;
-                $documents[] = [
-                    'title'   => $metadata['title'],
-                    'icon'    => MiscUtility::getIcon($documentKey),
-                    'type'    => 'Extension',
-                    'key'     => $documentKey,
-                    'shortcut' => $extensionKey,
-                    'url'     => 'https://docs.typo3.org/typo3cms/extensions/' . $extensionKey . '/',
-                    'version' => $version,
-                ];
-            }
-        }
-
-        return $documents;
-    }
-
-    /**
-     * Fetches the nearest version of a document from docs.typo3.org.
-     *
-     * Algorithm is as follows:
-     *
-     * 1) If exact version/language pair exists, fetch it
-     * 2) If document with version trimmed down to 2 digits and given language exists, fetch it
-     * 3) If document with version 'latest' and given language exists, fetch it
-     * 4) Restart at step 1) with language 'default'
-     *
-     * @param string $url
-     * @param string $key
-     * @param string $version
-     * @param string $language
-     * @return bool TRUE if fetch succeeded, otherwise FALSE
-     */
-    public function fetchNearestDocument($url, $key, $version = 'latest', $language = 'default')
-    {
-        // In case we could not find a working combination
-        $success = false;
-
-        $packages = $this->getAvailablePackages($url);
-        if (empty($packages)) {
-            return $success;
-        }
-
-        $languages = [$language];
-        if ($language !== 'default') {
-            $languages[] = 'default';
-        }
-        foreach ($languages as $language) {
-            // Step 1)
-            if (isset($packages[$version][$language])) {
-                $success |= $this->fetchDocument($url, $key, $version, $language);
-                // Fetch next language
-                continue;
-            }
-            if (isset($packages[$version])) {
-                foreach ($packages[$version] as $locale => $_) {
-                    if (GeneralUtility::isFirstPartOfStr($locale, $language)) {
-                        $success |= $this->fetchDocument($url, $key, $version, $locale);
-                        // Fetch next language (jump current foreach up to the loop of $languages)
-                        continue 2;
-                    }
-                }
-            }
-
-            // Step 2)
-            if (preg_match('/^(\d+\.\d+)\.\d+$/', $version, $matches)) {
-                // Instead of a 3-digit version, try to get it on 2 digits
-                $shortVersion = $matches[1];
-                if (isset($packages[$shortVersion][$language])) {
-                    $success |= $this->fetchDocument($url, $key, $shortVersion, $language);
-                    // Fetch next language
-                    continue;
-                }
-            }
-            // Step 3)
-            if ($version !== 'latest' && isset($packages['latest'][$language])) {
-                $success |= $this->fetchDocument($url, $key, 'latest', $language);
-                // Fetch next language
-                continue;
-            }
-        }
-
-        return $success;
-    }
-
-    /**
-     * Fetches a document from docs.typo3.org.
-     *
-     * @param string $url
-     * @param string $key
-     * @param string $version
-     * @param string $language
-     * @return bool TRUE if fetch succeeded, otherwise FALSE
-     */
-    public function fetchDocument($url, $key, $version = 'latest', $language = 'default')
-    {
-        $result = false;
-        $url = rtrim($url, '/') . '/';
-
-        $packagePrefix = substr($key, strrpos($key, '.') + 1);
-        $languageSegment = str_replace('_', '-', strtolower($language));
-        $packageName = sprintf('%s-%s-%s.zip', $packagePrefix, $version, $languageSegment);
-        $packageUrl = $url . 'packages/' . $packageName;
-        $absolutePathToZipFile = Environment::getVarPath() . '/transient/' . $packageName;
-
-        $packages = $this->getAvailablePackages($url);
-        if (empty($packages) || !isset($packages[$version][$language])) {
-            return false;
-        }
-
-        // Check if a local version of the package is already present
-        $hasArchive = false;
-        if (is_file($absolutePathToZipFile)) {
-            $localMd5 = md5_file($absolutePathToZipFile);
-            $remoteMd5 = $packages[$version][$language];
-            $hasArchive = $localMd5 === $remoteMd5;
-        }
-
-        if (!$hasArchive) {
-            /** @var RequestFactory $requestFactory */
-            $requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
-            $response = $requestFactory->request($packageUrl, 'GET');
-            if ($response->getStatusCode() === 200) {
-                GeneralUtility::writeFileToTypo3tempDir($absolutePathToZipFile, $response->getBody()->getContents());
-            }
-        }
-
-        if (is_file($absolutePathToZipFile)) {
-            $absoluteDocumentPath = GeneralUtility::getFileAbsFileName('typo3conf/Documentation/');
-
-            $result = $this->unzipDocumentPackage($absolutePathToZipFile, $absoluteDocumentPath);
-
-            // Create a composer.json file
-            $absoluteCacheFilename = Environment::getVarPath() . '/transient/documents.json';
-            $documents = json_decode(file_get_contents($absoluteCacheFilename), true);
-            foreach ($documents as $document) {
-                if ($document['key'] === $key) {
-                    $composerData = [
-                        'name' => $document['title'],
-                        'type' => 'documentation',
-                        'description' => 'TYPO3 ' . $document['type'],
-                    ];
-                    $relativeComposerFilename = $key . '/' . $language . '/composer.json';
-                    $absoluteComposerFilename = GeneralUtility::getFileAbsFileName('typo3conf/Documentation/' . $relativeComposerFilename);
-                    GeneralUtility::writeFile($absoluteComposerFilename, json_encode($composerData));
-                    break;
-                }
-            }
-        }
-
-        return $result;
-    }
-
-    /**
-     * Returns the available packages (version + language) for a given
-     * document on docs.typo3.org.
-     *
-     * @param string $url
-     * @return array
-     */
-    protected function getAvailablePackages($url)
-    {
-        $packages = [];
-        $url = rtrim($url, '/') . '/';
-        $indexUrl = $url . 'packages/packages.xml';
-
-        $remote = GeneralUtility::getUrl($indexUrl);
-        if ($remote) {
-            $packages = $this->parsePackagesXML($remote);
-        }
-
-        return $packages;
-    }
-
-    /**
-     * Parses content of packages.xml into a suitable array.
-     *
-     * @param string $string: XML data to parse
-     * @throws XmlParser
-     * @return array Array representation of XML data
-     */
-    protected function parsePackagesXML($string)
-    {
-        // Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept
-        $previousValueOfEntityLoader = libxml_disable_entity_loader(true);
-        $data = json_decode(json_encode((array)simplexml_load_string($string)), true);
-        libxml_disable_entity_loader($previousValueOfEntityLoader);
-        if (count($data) !== 2) {
-            throw new XmlParser('Error in XML parser while decoding packages XML file.', 1374222437);
-        }
-
-        // SimpleXML does not properly handle arrays with only 1 item
-        if ($data['languagePackIndex']['languagepack'][0] === null) {
-            $data['languagePackIndex']['languagepack'] = [$data['languagePackIndex']['languagepack']];
-        }
-
-        $packages = [];
-        foreach ($data['languagePackIndex']['languagepack'] as $languagePack) {
-            $language = $languagePack['@attributes']['language'];
-            $version = $languagePack['@attributes']['version'];
-            $packages[$version][$language] = $languagePack['md5'];
-        }
-
-        return $packages;
-    }
-
-    /**
-     * Unzips a document package.
-     *
-     * @param string $file path to zip file
-     * @param string $path path to extract to
-     * @throws \TYPO3\CMS\Documentation\Exception\Document
-     * @return bool
-     */
-    protected function unzipDocumentPackage($file, $path)
-    {
-        $zip = zip_open($file);
-        if (is_resource($zip)) {
-            $result = true;
-
-            if (!is_dir($path)) {
-                GeneralUtility::mkdir_deep($path);
-            }
-
-            while (($zipEntry = zip_read($zip)) !== false) {
-                $zipEntryName = zip_entry_name($zipEntry);
-                if (strpos($zipEntryName, '/') !== false) {
-                    $zipEntryPathSegments = explode('/', $zipEntryName);
-                    $fileName = array_pop($zipEntryPathSegments);
-                    // It is a folder, because the last segment is empty, let's create it
-                    if (empty($fileName)) {
-                        GeneralUtility::mkdir_deep($path . implode('/', $zipEntryPathSegments));
-                    } else {
-                        $absoluteTargetPath = GeneralUtility::getFileAbsFileName($path . implode('/', $zipEntryPathSegments) . '/' . $fileName);
-                        if (trim($absoluteTargetPath) !== '') {
-                            $return = GeneralUtility::writeFile(
-                                $absoluteTargetPath,
-                                zip_entry_read($zipEntry, zip_entry_filesize($zipEntry))
-                            );
-                            if ($return === false) {
-                                throw new Document('Could not write file ' . $zipEntryName, 1374161546);
-                            }
-                        } else {
-                            throw new Document('Could not write file ' . $zipEntryName, 1374161532);
-                        }
-                    }
-                } else {
-                    throw new Document('Extension directory missing in zip file!', 1374161519);
-                }
-            }
-        } else {
-            throw new Document('Unable to open zip file ' . $file, 1374161508);
-        }
-
-        return $result;
-    }
-}
diff --git a/typo3/sysext/documentation/Classes/Slots/ExtensionManager.php b/typo3/sysext/documentation/Classes/Slots/ExtensionManager.php
deleted file mode 100644 (file)
index b7abbbd..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Slots;
-
-/*
- * 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\Imaging\Icon;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Documentation\ViewHelpers\FormatsViewHelper;
-use TYPO3\CMS\Fluid\Core\Rendering\RenderingContext;
-
-/**
- * This slot listens to a signal in Extension Manager to add links to
- * manuals available locally.
- */
-class ExtensionManager
-{
-    /**
-     * @var \TYPO3\CMS\Documentation\Domain\Model\Document[]
-     */
-    protected static $documents;
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-     */
-    protected $objectManager;
-
-    /**
-     * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
-     */
-    public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
-    {
-        $this->objectManager = $objectManager;
-    }
-
-    /**
-     * Processes the list of actions for a given extension and adds
-     * a link to the manual(s), if available.
-     *
-     * @param array $extension
-     * @param array $actions
-     */
-    public function processActions(array $extension, array &$actions)
-    {
-        if (static::$documents === null) {
-            /** @var \TYPO3\CMS\Documentation\Controller\DocumentController $documentController */
-            $documentController = $this->objectManager->get(\TYPO3\CMS\Documentation\Controller\DocumentController::class);
-            static::$documents = $documentController->getDocuments();
-        }
-
-        $extensionKey = $extension['key'];
-        $documentKey = 'typo3cms.extensions.' . $extensionKey;
-
-        if (isset(static::$documents[$documentKey])) {
-            $document = static::$documents[$documentKey];
-
-            foreach ($document->getTranslations() as $documentTranslation) {
-                $actions[] = FormatsViewHelper::renderStatic(
-                    [
-                        'documentTranslation' => $documentTranslation,
-                    ],
-                    function () {
-                    },
-                    new RenderingContext()
-                );
-            }
-        } else {
-            $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-            $emptyIcon = $iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render();
-            $actions[] = '<span class="btn btn-default disabled">' . $emptyIcon . '</span>';
-            $actions[] = '<span class="btn btn-default disabled">' . $emptyIcon . '</span>';
-            $actions[] = '<span class="btn btn-default disabled">' . $emptyIcon . '</span>';
-        }
-    }
-}
diff --git a/typo3/sysext/documentation/Classes/Utility/MiscUtility.php b/typo3/sysext/documentation/Classes/Utility/MiscUtility.php
deleted file mode 100644 (file)
index ef3aceb..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Utility;
-
-/*
- * 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\Core\Environment;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use TYPO3\CMS\Core\Utility\PathUtility;
-
-/**
- * Misc utility.
- */
-class MiscUtility
-{
-    /**
-     * Returns meta-data for a given extension.
-     *
-     * @param string $extensionKey
-     * @return array
-     */
-    public static function getExtensionMetaData($extensionKey)
-    {
-        $_EXTKEY = $extensionKey;
-        $EM_CONF = [];
-        $extPath = ExtensionManagementUtility::extPath($extensionKey);
-        include $extPath . 'ext_emconf.php';
-
-        $release = $EM_CONF[$_EXTKEY]['version'];
-        list($major, $minor, $_) = explode('.', $release, 3);
-        if (($pos = strpos($minor, '-')) !== false) {
-            // $minor ~ '2-dev'
-            $minor = substr($minor, 0, $pos);
-        }
-        $EM_CONF[$_EXTKEY]['version'] = $major . '.' . $minor;
-        $EM_CONF[$_EXTKEY]['release'] = $release;
-        $EM_CONF[$_EXTKEY]['extensionKey'] = $extensionKey;
-
-        return $EM_CONF[$_EXTKEY];
-    }
-
-    /**
-     * Returns the icon associated to a given document key.
-     *
-     * @param string $documentKey
-     * @return string
-     */
-    public static function getIcon($documentKey)
-    {
-        $basePath = 'typo3conf/Documentation/';
-        $documentPath = $basePath . $documentKey . '/';
-
-        // Fallback icon
-        $icon = ExtensionManagementUtility::getExtensionIcon(ExtensionManagementUtility::extPath('documentation'), true);
-        $icon = PathUtility::stripPathSitePrefix($icon);
-
-        if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($documentKey, 'typo3cms.extensions.')) {
-            // Standard extension icon
-            $extensionKey = substr($documentKey, 20);
-            if (ExtensionManagementUtility::isLoaded($extensionKey)) {
-                $extensionPath = ExtensionManagementUtility::extPath($extensionKey);
-                $icon = ExtensionManagementUtility::getExtensionIcon($extensionPath, true);
-                $icon = PathUtility::stripPathSitePrefix($icon);
-            }
-        } elseif (is_file(Environment::getPublicPath() . '/' . $documentPath . 'icon.png')) {
-            $icon = $documentPath . 'icon.png';
-        } elseif (is_file(Environment::getPublicPath() . '/' . $documentPath . 'icon.gif')) {
-            $icon = $documentPath . 'icon.gif';
-        }
-
-        return $icon;
-    }
-}
diff --git a/typo3/sysext/documentation/Classes/ViewHelpers/FormatsViewHelper.php b/typo3/sysext/documentation/Classes/ViewHelpers/FormatsViewHelper.php
deleted file mode 100644 (file)
index 2b92d58..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\ViewHelpers;
-
-/*
- * 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\Imaging\Icon;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation;
-use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
-use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
-
-/**
- * ViewHelper to display all download links for a document
- *
- * Example: <doc:formats document="{document}" />
- *
- * @internal
- */
-class FormatsViewHelper extends AbstractViewHelper
-{
-    use CompileWithRenderStatic;
-
-    /**
-     * As this ViewHelper renders HTML, the output must not be escaped.
-     *
-     * @var bool
-     */
-    protected $escapeOutput = false;
-
-    /**
-     * Initializes the arguments
-     *
-     * @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception
-     */
-    public function initializeArguments()
-    {
-        $this->registerArgument('documentTranslation', DocumentTranslation::class, '', true);
-    }
-
-    /**
-     * Statically renders all format download links.
-     *
-     * @param array $arguments
-     * @param \Closure $renderChildrenClosure
-     * @param RenderingContextInterface $renderingContext
-     *
-     * @return string
-     */
-    public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
-    {
-        /** @var \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $documentTranslation */
-        $documentTranslation = $arguments['documentTranslation'];
-
-        /** @var IconFactory $iconFactory */
-        $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-        $emptyIcon = $iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render();
-        $icons = [
-            'html' => '<a class="btn btn-default disabled">' . $emptyIcon . '</a>',
-            'pdf' => '<a class="btn btn-default disabled">' . $emptyIcon . '</a>',
-            'sxw' => '<a class="btn btn-default disabled">' . $emptyIcon . '</a>'
-        ];
-        $formats = $documentTranslation->getFormats();
-
-        foreach ($formats as $format) {
-            $output = '';
-            /** @var \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $format */
-            $output .= '<a ';
-
-            $uri = '../' . $format->getPath();
-            $documentFormat = $format->getFormat();
-            $extension = substr($uri, strrpos($uri, '.') + 1);
-            if (strlen($extension) < 5) {
-                // This is direct link to a file
-                $output .= 'href="' . htmlspecialchars($uri) . '" class="btn btn-default"';
-                $iconHtml = static::getIconForFileExtension($extension, $iconFactory);
-            } else {
-                $output .= 'href="#" onclick="top.TYPO3.Backend.ContentContainer.setUrl(' . GeneralUtility::quoteJSvalue($uri) . ')" class="btn btn-default"';
-                $iconHtml = static::getIconForFileExtension($documentFormat, $iconFactory);
-            }
-
-            $xliff = 'LLL:EXT:documentation/Resources/Private/Language/locallang.xlf';
-            $title = sprintf(
-                $GLOBALS['LANG']->sL($xliff . ':tx_documentation_domain_model_documentformat.format.title'),
-                $documentFormat
-            );
-            $output .= ' title="' . htmlspecialchars($title) . '">';
-            $output .= $iconHtml . '</a>' . LF;
-            if ($documentFormat === 'json') {
-                // It should take over the place of sxw which will then never be used
-                $documentFormat = 'sxw';
-            }
-            $icons[$documentFormat] = $output;
-        }
-        return implode('', array_values($icons));
-    }
-
-    /**
-     * Returns the icon associated to a given file extension (privileging black and white).
-     *
-     * @param IconFactory $iconFactory
-     * @param string $extension
-     * @return string
-     */
-    protected static function getIconForFileExtension($extension, IconFactory $iconFactory)
-    {
-        switch ($extension) {
-            case 'html':
-            case 'pdf':
-                $iconHtml = $iconFactory->getIcon('actions-file-' . $extension, Icon::SIZE_SMALL)->render();
-                break;
-            case 'sxw':
-                $iconHtml = $iconFactory->getIcon('actions-file-openoffice', Icon::SIZE_SMALL)->render();
-                break;
-            case 'json':
-                $iconHtml = $iconFactory->getIcon('actions-system-extension-documentation', Icon::SIZE_SMALL)->render();
-                break;
-            default:
-                $iconHtml = $iconFactory->getIconForFileExtension($extension, Icon::SIZE_SMALL)->render();
-        }
-        return $iconHtml;
-    }
-}
diff --git a/typo3/sysext/documentation/Configuration/Backend/AjaxRoutes.php b/typo3/sysext/documentation/Configuration/Backend/AjaxRoutes.php
deleted file mode 100644 (file)
index 47f2ab9..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-
-/**
- * Definitions for routes provided by EXT:documentation
- */
-return [
-    'documentation_remove' => [
-        'path' => '/documentation/remove',
-        'target' => \TYPO3\CMS\Documentation\Controller\DocumentController::class . '::deleteAction'
-    ],
-];
diff --git a/typo3/sysext/documentation/LICENSE.txt b/typo3/sysext/documentation/LICENSE.txt
deleted file mode 100644 (file)
index 95d36a7..0000000
+++ /dev/null
@@ -1,345 +0,0 @@
-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/documentation/README.rst b/typo3/sysext/documentation/README.rst
deleted file mode 100644 (file)
index 11be58b..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-.. ==================================================
-.. FOR YOUR INFORMATION
-.. --------------------------------------------------
-.. -*- coding: utf-8 -*- with BOM.
-
-
-.. _start:
-
-=============
-Documentation
-=============
-
-This extension provides a Backend module for TYPO3 to show both the documentation of local extensions and custom
-documents.
-
-The Backend module features two actions:
-
-#. Show Documentation
-#. Download Documentation
-
-
-Show Documentation
-==================
-
-This view shows a list of available documents:
-
-- Extensions with a manual rendered as ``html`` or ``pdf``;
-- Extensions with an OpenOffice manual (``sxw``);
-- Official TYPO3 documentation (tutorials, references, ...) available locally;
-- Custom documents, rendered either as ``html`` or ``pdf``.
-
-To be listed, documents should be stored within ``typo3conf/Documentation/<documentation-key>/<language>/<format>/``:
-
-``documentation-key``
-       Extensions use the documentation key ``typo3cms.extensions.<extension-key>``.
-
-``language``
-       Either "default" (for English) or a proper locale identifying your translated documentation. E.g.,
-       ``fr_FR``, ``fr_CA``, ``de_DE`` ...
-
-``format``
-       Either ``html`` or ``pdf``. Additional formats may be supported by 3rd party extensions
-       (such as `EXT:sphinx <https://typo3.org/extensions/repository/view/sphinx>`_).
-
-
-Registering Custom Documents
-----------------------------
-
-#. Choose a documentation key such as ``<company>.<document-name>``
-
-#. Put your documentation as HTML (main file *must be* ``Index.html``) within
-   ``typo3conf/Documentation/<documentation-key>/default/html/`` or as PDF (any name will fit) within
-   ``typo3conf/Documentation/<documentation-key>/default/pdf/``
-
-#. Create a text description file ``composer.json`` containing the title and description of your documentation and place
-   it within ``typo3conf/Documentation/<documentation-key>/default/``:
-
-   .. code-block:: json
-
-       {
-           "name": "Put some title here",
-           "type": "documentation",
-           "description": "Put some description here."
-       }
-
-#. [optionally] Put a custom icon (either ``icon.png`` or ``icon.gif``) within directory
-   ``typo3conf/Documentation/<documentation-key>/``
-
-
-Download Documentation
-======================
-
-This view is only accessible to TYPO3 administrators. It shows a form to retrieve rendered documentation for loaded
-extensions and to fetch a copy of official TYPO3 manuals, guides and references from https://docs.typo3.org.
-
-
-Configuration
-=============
-
-There are two User TSconfig options available:
-
-mod.help_DocumentationDocumentation.documents.hide
-  Comma-separated list of keys of documentation that should be hidden from the user.
-
-mod.help_DocumentationDocumentation.documents.show
-  Comma-separated list of keys of documentation that should be shown to the user (others are implicitly hidden).
diff --git a/typo3/sysext/documentation/Resources/Private/.htaccess b/typo3/sysext/documentation/Resources/Private/.htaccess
deleted file mode 100644 (file)
index 9a779b7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# Apache < 2.3
-<IfModule !mod_authz_core.c>
-       Order allow,deny
-       Deny from all
-       Satisfy All
-</IfModule>
-
-# Apache ≥ 2.3
-<IfModule mod_authz_core.c>
-       Require all denied
-</IfModule>
\ No newline at end of file
diff --git a/typo3/sysext/documentation/Resources/Private/Language/locallang.xlf b/typo3/sysext/documentation/Resources/Private/Language/locallang.xlf
deleted file mode 100644 (file)
index 7782c14..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415814814" source-language="en" datatype="plaintext" original="messages" date="2013-07-04T16:35:47Z" product-name="documentation">
-               <header/>
-               <body>
-
-                       <trans-unit id="documentation_manager">
-                               <source>Documentation Manager</source>
-                       </trans-unit>
-
-                       <trans-unit id="documentation.title">
-                               <source>Title</source>
-                       </trans-unit>
-                       <trans-unit id="documentation.type">
-                               <source>Type</source>
-                       </trans-unit>
-                       <trans-unit id="documentation.shortcut">
-                               <source>Extension key</source>
-                       </trans-unit>
-                       <trans-unit id="documentation.actions">
-                               <source>Actions</source>
-                       </trans-unit>
-                       <trans-unit id="documentation.actions.download">
-                               <source>Download document</source>
-                       </trans-unit>
-
-                       <trans-unit id="tx_documentation_domain_model_document">
-                               <source>Document</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_document.package_key">
-                               <source>Package Key</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_document.extension_key">
-                               <source>Extension Key</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_document.title">
-                               <source>Title</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_document.version">
-                               <source>Version</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_document.translations">
-                               <source>Translations</source>
-                       </trans-unit>
-
-                       <trans-unit id="tx_documentation_domain_model_documenttranslation">
-                               <source>Document Translation</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_documenttranslation.language">
-                               <source>Language</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_documenttranslation.title">
-                               <source>Title</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_documenttranslation.description">
-                               <source>Description</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_documenttranslation.actions">
-                               <source>Actions</source>
-                       </trans-unit>
-
-                       <trans-unit id="tx_documentation_domain_model_documentformat">
-                               <source>Document Format</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_documentformat.format">
-                               <source>Format</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_documentformat.path">
-                               <source>Path</source>
-                       </trans-unit>
-                       <trans-unit id="tx_documentation_domain_model_documentformat.format.title">
-                               <source>Show documentation as %s</source>
-                       </trans-unit>
-
-                       <trans-unit id="showDocumentation">
-                               <source>Show Documentation</source>
-                       </trans-unit>
-                       <trans-unit id="downloadDocumentation">
-                               <source>Download Documentation</source>
-                       </trans-unit>
-                       <trans-unit id="searchTemplate.submitButton">
-                               <source>Go</source>
-                       </trans-unit>
-                       <trans-unit id="downloadSucceeded">
-                               <source>The rendered documentation was downloaded successfully.</source>
-                       </trans-unit>
-                       <trans-unit id="downloadFailed">
-                               <source>Download failed</source>
-                       </trans-unit>
-                       <trans-unit id="downloadFailedNoArchive">
-                               <source>No rendered documentation archive could be found on docs.typo3.org.</source>
-                       </trans-unit>
-                       <trans-unit id="downloadFailedDetails">
-                               <source>The documentation for "%s" could not be downloaded, because of the following error: %s (%d).</source>
-                       </trans-unit>
-                       <trans-unit id="deleteModalDescription">
-                               <source>Are you sure you want to delete this record?</source>
-                       </trans-unit>
-                       <trans-unit id="cancel">
-                               <source>Cancel</source>
-                       </trans-unit>
-                       <trans-unit id="delete">
-                               <source>Delete</source>
-                       </trans-unit>
-                       <trans-unit id="deleteFailed">
-                               <source>Deletion of documentation failed.</source>
-                       </trans-unit>
-                       <trans-unit id="documentationList.search">
-                               <source>Search</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/documentation/Resources/Private/Language/locallang_mod.xlf b/typo3/sysext/documentation/Resources/Private/Language/locallang_mod.xlf
deleted file mode 100644 (file)
index 361f5ad..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415814815" source-language="en" datatype="plaintext" original="messages" date="2013-07-04T16:35:47Z" product-name="documentation">
-               <header/>
-               <body>
-                       <trans-unit id="mlang_tabs_tab">
-                               <source>Documentation</source>
-                       </trans-unit>
-                       <trans-unit id="mlang_labels_tabdescr">
-                               <source>Backend module for TYPO3 to list and show documentation of loaded extensions as well as custom documents.</source>
-                       </trans-unit>
-                       <trans-unit id="mlang_labels_tablabel">
-                               <source>Documentation</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/documentation/Resources/Private/Layouts/Default.html b/typo3/sysext/documentation/Resources/Private/Layouts/Default.html
deleted file mode 100644 (file)
index a5c707a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<div class="typo3-documentation">
-       <f:render section="module-headline" />
-       <f:render section="Content" />
-</div>
diff --git a/typo3/sysext/documentation/Resources/Private/Templates/Document/Download.html b/typo3/sysext/documentation/Resources/Private/Templates/Document/Download.html
deleted file mode 100644 (file)
index 29a88cf..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<f:layout name="Default"/>
-
-<f:section name="module-headline">
-       <h1><f:translate key="downloadDocumentation">Download Documentation</f:translate></h1>
-</f:section>
-
-<f:section name="Content">
-       <form class="form-inline">
-               <div class="form-group">
-                       <f:form.textfield name="typo3-documentation-searchfield" placeholder="{f:translate(key:'documentationList.search')}" id="typo3-documentation-searchfield" value="{search}" class="form-control t3js-documentation-searchfield" />
-               </div>
-       </form>
-       <table id="typo3-documentation-download" class="table table-striped table-hover typo3-documentation-list t3js-documentation-list">
-               <thead>
-               <tr>
-                       <th><f:translate key="documentation.title" /></th>
-                       <th class="hidden-xs"><f:translate key="documentation.shortcut" /></th>
-                       <th class="hidden-xs"><f:translate key="documentation.type" /></th>
-                       <th><f:translate key="documentation.actions" /></th>
-               </tr>
-               </thead>
-               <tbody>
-               <f:for each="{documents}" as="document">
-                       <tr id="{document.key}" >
-                               <td class="col-nowrap">
-                                       <span class="typo3-app-icon">
-                                               <span>
-                                                       <span>
-                                                               <img src="../{document.icon}" title="{document.title}" alt="{document.title}" />
-                                                       </span>
-                                               </span>
-                                       </span>
-                                       {document.title}
-                               </td>
-                               <td class="hidden-xs">{document.shortcut}</td>
-                               <td class="hidden-xs">{document.type}</td>
-                               <td class="col-nowrap">
-                                       <f:link.action action="fetch" arguments="{url:document.url, key:document.key, version:document.version}" class="btn btn-default">
-                                               <span title="{f:translate(key:'documentation.actions.download')}">
-                                                       <core:icon identifier="actions-system-extension-download" />
-                                               </span>
-                                       </f:link.action>
-                               </td>
-                       </tr>
-               </f:for>
-               </tbody>
-       </table>
-</f:section>
diff --git a/typo3/sysext/documentation/Resources/Private/Templates/Document/List.html b/typo3/sysext/documentation/Resources/Private/Templates/Document/List.html
deleted file mode 100644 (file)
index fbdeed5..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-{namespace doc=TYPO3\CMS\Documentation\ViewHelpers}
-
-<f:layout name="Default" />
-
-<f:section name="module-headline">
-  <h1><f:translate key="showDocumentation">Show Documentation</f:translate></h1>
-</f:section>
-
-<f:section name="Content">
-  <form class="form-inline">
-    <div class="form-group">
-      <f:form.textfield name="typo3-documentation-searchfield" placeholder="{f:translate(key:'documentationList.search')}" id="typo3-documentation-searchfield" value="{search}" class="form-control t3js-documentation-searchfield" />
-    </div>
-  </form>
-  <table id="typo3-documentation-list" class="table table-striped table-hover typo3-documentation-list t3js-documentation-list">
-    <thead>
-      <tr>
-        <th><f:translate key="tx_documentation_domain_model_document.title" /></th>
-        <th><f:translate key="tx_documentation_domain_model_documenttranslation.description" /></th>
-        <th><f:translate key="tx_documentation_domain_model_documenttranslation.actions" /></th>
-      </tr>
-    </thead>
-    <tbody>
-      <f:for each="{documents}" as="document">
-        <f:for each="{document.translations}" as="translation">
-          <tr id="{document.packageKey}" >
-            <td class="col-nowrap">
-              <span class="typo3-app-icon">
-                <span>
-                  <span>
-                    <img src="../{document.icon}" title="{translation.title}" alt="{translation.title}" />
-                  </span>
-                </span>
-              </span>
-              {translation.title}
-              <f:if condition="{document.extensionKey}">({document.extensionKey})</f:if>
-            </td>
-            <td>{translation.description}</td>
-            <td class="col-nowrap">
-              <div class="btn-group">
-                <doc:formats documentTranslation="{translation}" />
-                <f:for each="{document.translations}" as="documentation">
-                  <f:alias map="{documentation-delete-description: '{f:translate(key: \'deleteModalDescription\', extensionName: \'Documentation\')}'}">
-                  <f:link.action action="delete" class="btn btn-default t3js-documentation-delete" additionalAttributes="{data: {documentation-key: '{document.packageKey}', documentation-name: '{documentation.title}', documentation-delete-description: '{documentation-delete-description}'}}" arguments="{packageKey: '{document.packageKey}'}">
-                    <core:icon identifier="actions-edit-delete"/>
-                  </f:link.action>
-                  </f:alias>
-                </f:for>
-              </div>
-            </td>
-          </tr>
-        </f:for>
-      </f:for>
-    </tbody>
-  </table>
-</f:section>
diff --git a/typo3/sysext/documentation/Resources/Public/Icons/Extension.png b/typo3/sysext/documentation/Resources/Public/Icons/Extension.png
deleted file mode 100644 (file)
index 363aa70..0000000
Binary files a/typo3/sysext/documentation/Resources/Public/Icons/Extension.png and /dev/null differ
diff --git a/typo3/sysext/documentation/Resources/Public/Icons/module-documentation.svg b/typo3/sysext/documentation/Resources/Public/Icons/module-documentation.svg
deleted file mode 100644 (file)
index 4678728..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="#DA6C39" d="M0 0h64v64H0z"/><path fill="#FFF" d="M43.6 51.6l-6.8-6.8c-.3-.3-.1-.9.4-.9H42v-8h4v8h4.8c.4 0 .7.5.4.9l-6.8 6.8c-.2.2-.6.2-.8 0z"/><path fill="#FFF" d="M34 47.7c-1.3-1.3-1.7-3.2-1-4.9.7-1.7 2.3-2.8 4.2-2.8h.8v-8h8V15c0-.6-.4-1-1-1H19c-.6 0-1 .4-1 1v34c0 .6.4 1 1 1h17.3L34 47.7z"/><path fill="#DA6C39" d="M20 16h2v32h-2zM26 18h16v2H26z"/></svg>
\ No newline at end of file
diff --git a/typo3/sysext/documentation/Resources/Public/JavaScript/Main.js b/typo3/sysext/documentation/Resources/Public/JavaScript/Main.js
deleted file mode 100644 (file)
index 82332ad..0000000
+++ /dev/null
@@ -1,150 +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!
- */
-
-/**
- * Module: TYPO3/CMS/Documentation/Main
- * JavaScript module for ext:documentation
- */
-define(['jquery', 'datatables', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/Backend/Notification', 'TYPO3/CMS/Backend/Severity', 'TYPO3/CMS/Backend/jquery.clearable'], function($, DataTable, Modal, Notification, Severity) {
-  'use strict';
-
-  /**
-   *
-   * @type {{dataTable: null, searchField: null, identifier: {documentationList: string, searchField: string, deleteButtons: string}}}
-   * @exports TYPO3/CMS/Documentation/Main
-   */
-  var Documentation = {
-    dataTable: null,
-    searchField: null,
-    identifier: {
-      documentationList: '.t3js-documentation-list',
-      searchField: '.t3js-documentation-searchfield',
-      deleteButtons: '.t3js-documentation-delete'
-    }
-  };
-
-  /**
-   *  Initializes the data table, depending on the current view
-   */
-  Documentation.initializeView = function() {
-    var getVars = Documentation.getUrlVars();
-    // init datatable
-    this.dataTable = $(this.identifier.documentationList).DataTable({
-      paging: false,
-      dom: 'lrtip',
-      lengthChange: false,
-      pageLength: 15,
-      stateSave: true,
-      order: [[1, 'asc']]
-    });
-    // search field
-    this.searchField = $(this.identifier.searchField);
-    if (this.dataTable && this.searchField.length) {
-      this.searchField.parents('form').on('submit', function() {
-        return false;
-      });
-      var currentSearch = (getVars['search'] ? getVars['search'] : this.dataTable.search());
-      this.searchField.val(currentSearch);
-      this.searchField.on('input', function(e) {
-        Documentation.dataTable.search($(this).val()).draw();
-      });
-    }
-  };
-
-  /**
-   * Utility method to retrieve query parameters
-   *
-   * @returns {Array}
-   */
-  Documentation.getUrlVars = function getUrlVars() {
-    var vars = [], hash;
-    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
-    for (var i = 0; i < hashes.length; i++) {
-      hash = hashes[i].split('=');
-      vars.push(hash[0]);
-      vars[hash[0]] = hash[1];
-    }
-    return vars;
-  };
-
-  /**
-   * Delete documentation
-   *
-   * @param {Object} $documentationRecord
-   */
-  Documentation.deleteDocumentation = function($documentationRecord) {
-
-    Modal.confirm($documentationRecord.data('documentationName'), $documentationRecord.data('documentationDeleteDescription'), Severity.warning, [
-      {
-        text: TYPO3.lang['cancel'],
-        active: true,
-        btnClass: 'btn-default',
-        trigger: function() {
-          Modal.dismiss();
-        }
-      }, {
-        text: TYPO3.lang['delete'],
-        btnClass: 'btn-info',
-        trigger: function() {
-          $.ajax({
-            url: TYPO3.settings.ajaxUrls['documentation_remove'],
-            data: {
-              documentationKey: $documentationRecord.data('documentationKey')
-            },
-            type: 'post',
-            cache: false
-          }).done(function(data) {
-            if (data) {
-              $documentationRecord.closest('tr').fadeOut();
-            } else {
-              Documentation.handleErrors(data);
-            }
-          });
-          Modal.dismiss();
-        }
-      }
-    ]);
-
-  };
-
-  /**
-   * handle the errors from result object
-   *
-   * @param {Object} result
-   * @private
-   */
-  Documentation.handleErrors = function(result) {
-    $.each(result.messages, function(position, message) {
-      Notification.error(message.title, message.message);
-    });
-  };
-
-  $(function() {
-    // Initialize the view
-    Documentation.initializeView();
-
-    // Make the data table filter react to the clearing of the filter field
-    $(Documentation.identifier.searchField).clearable({
-      onClear: function() {
-        Documentation.dataTable.search('').draw();
-      }
-    });
-    $(Documentation.identifier.deleteButtons).on('click', function(e) {
-      e.preventDefault();
-      e.stopPropagation();
-      Documentation.deleteDocumentation($(this));
-    })
-  });
-
-  return Documentation;
-});
diff --git a/typo3/sysext/documentation/Tests/Unit/Domain/Model/DocumentFormatTest.php b/typo3/sysext/documentation/Tests/Unit/Domain/Model/DocumentFormatTest.php
deleted file mode 100644 (file)
index f431fce..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Tests\Unit\Domain\Model;
-
-/*
- * 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!
- */
-
-/**
- * Test case
- */
-class DocumentFormatTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
-{
-    /**
-     * @var \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat
-     */
-    protected $subject;
-
-    protected function setUp()
-    {
-        $this->subject = new \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat();
-    }
-
-    /**
-     * @test
-     */
-    public function setFormatForStringSetsFormat()
-    {
-        $this->subject->setFormat('Conceived at T3DD13');
-
-        $this->assertSame(
-            'Conceived at T3DD13',
-            $this->subject->getFormat()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function setPathForStringSetsPath()
-    {
-        $this->subject->setPath('Conceived at T3DD13');
-
-        $this->assertSame(
-            'Conceived at T3DD13',
-            $this->subject->getPath()
-        );
-    }
-}
diff --git a/typo3/sysext/documentation/Tests/Unit/Domain/Model/DocumentTest.php b/typo3/sysext/documentation/Tests/Unit/Domain/Model/DocumentTest.php
deleted file mode 100644 (file)
index 7ee5601..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Tests\Unit\Domain\Model;
-
-/*
- * 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!
- */
-
-/**
- * Test case
- */
-class DocumentTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
-{
-    /**
-     * @var \TYPO3\CMS\Documentation\Domain\Model\Document
-     */
-    protected $subject;
-
-    protected function setUp()
-    {
-        $this->subject = new \TYPO3\CMS\Documentation\Domain\Model\Document();
-    }
-
-    /**
-     * @test
-     */
-    public function setPackageKeyForStringSetsPackageKey()
-    {
-        $this->subject->setPackageKey('Conceived at T3DD13');
-
-        $this->assertSame(
-            'Conceived at T3DD13',
-            $this->subject->getPackageKey()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function setIconForStringSetsTitle()
-    {
-        $this->subject->setIcon('Conceived at T3DD13');
-
-        $this->assertSame(
-            'Conceived at T3DD13',
-            $this->subject->getIcon()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function getTranslationsReturnsInitialValueForDocumentTranslation()
-    {
-        $newObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $this->assertEquals(
-            $newObjectStorage,
-            $this->subject->getTranslations()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function setTranslationsForObjectStorageContainingDocumentTranslationSetsTranslations()
-    {
-        $translation = new \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation();
-        $objectStorageHoldingExactlyOneTranslations = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $objectStorageHoldingExactlyOneTranslations->attach($translation);
-        $this->subject->setTranslations($objectStorageHoldingExactlyOneTranslations);
-
-        $this->assertSame(
-            $objectStorageHoldingExactlyOneTranslations,
-            $this->subject->getTranslations()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function addTranslationToObjectStorageHoldingTranslations()
-    {
-        $translation = new \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation();
-        $objectStorageHoldingExactlyOneTranslation = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $objectStorageHoldingExactlyOneTranslation->attach($translation);
-        $this->subject->addTranslation($translation);
-
-        $this->assertEquals(
-            $objectStorageHoldingExactlyOneTranslation,
-            $this->subject->getTranslations()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function removeTranslationFromObjectStorageHoldingTranslations()
-    {
-        $translation = new \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation();
-        $localObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $localObjectStorage->attach($translation);
-        $localObjectStorage->detach($translation);
-        $this->subject->addTranslation($translation);
-        $this->subject->removeTranslation($translation);
-
-        $this->assertEquals(
-            $localObjectStorage,
-            $this->subject->getTranslations()
-        );
-    }
-}
diff --git a/typo3/sysext/documentation/Tests/Unit/Domain/Model/DocumentTranslationTest.php b/typo3/sysext/documentation/Tests/Unit/Domain/Model/DocumentTranslationTest.php
deleted file mode 100644 (file)
index dc5789f..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-namespace TYPO3\CMS\Documentation\Tests\Unit\Domain\Model;
-
-/*
- * 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!
- */
-
-/**
- * Test case
- */
-class DocumentTranslationTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
-{
-    /**
-     * @var \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation
-     */
-    protected $subject;
-
-    protected function setUp()
-    {
-        $this->subject = new \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation();
-    }
-
-    /**
-     * @test
-     */
-    public function setLanguageForStringSetsLocale()
-    {
-        $this->subject->setLanguage('Conceived at T3DD13');
-
-        $this->assertSame(
-            'Conceived at T3DD13',
-            $this->subject->getLanguage()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function setTitleForStringSetsTitle()
-    {
-        $this->subject->setTitle('Conceived at T3DD13');
-
-        $this->assertSame(
-            'Conceived at T3DD13',
-            $this->subject->getTitle()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function getFormatsReturnsInitialValueForDocumentFormat()
-    {
-        $newObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $this->assertEquals(
-            $newObjectStorage,
-            $this->subject->getFormats()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function setFormatsForObjectStorageContainingDocumentFormatSetsFormats()
-    {
-        $format = new \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat();
-        $objectStorageHoldingExactlyOneFormats = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $objectStorageHoldingExactlyOneFormats->attach($format);
-        $this->subject->setFormats($objectStorageHoldingExactlyOneFormats);
-
-        $this->assertSame(
-            $objectStorageHoldingExactlyOneFormats,
-            $this->subject->getFormats()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function addFormatToObjectStorageHoldingFormats()
-    {
-        $format = new \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat();
-        $objectStorageHoldingExactlyOneFormat = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $objectStorageHoldingExactlyOneFormat->attach($format);
-        $this->subject->addFormat($format);
-
-        $this->assertEquals(
-            $objectStorageHoldingExactlyOneFormat,
-            $this->subject->getFormats()
-        );
-    }
-
-    /**
-     * @test
-     */
-    public function removeFormatFromObjectStorageHoldingFormats()
-    {
-        $format = new \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat();
-        $localObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-        $localObjectStorage->attach($format);
-        $localObjectStorage->detach($format);
-        $this->subject->addFormat($format);
-        $this->subject->removeFormat($format);
-
-        $this->assertEquals(
-            $localObjectStorage,
-            $this->subject->getFormats()
-        );
-    }
-}
diff --git a/typo3/sysext/documentation/composer.json b/typo3/sysext/documentation/composer.json
deleted file mode 100644 (file)
index cda46e4..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-       "name": "typo3/cms-documentation",
-       "type": "typo3-cms-framework",
-       "description": "Backend module for TYPO3 to list and show documentation of loaded extensions as well as custom documents.",
-       "homepage": "https://typo3.org",
-       "license": ["GPL-2.0-or-later"],
-       "authors": [{
-               "name": "TYPO3 Core Team",
-               "email": "typo3cms@typo3.org",
-               "role": "Developer"
-       }],
-       "config": {
-               "sort-packages": true
-       },
-       "require": {
-               "typo3/cms-core": "9.4.*@dev"
-       },
-       "conflict": {
-               "typo3/cms": "*"
-       },
-       "replace": {
-               "documentation": "*"
-       },
-       "extra": {
-               "branch-alias": {
-                       "dev-master": "9.4.x-dev"
-               },
-               "typo3/cms": {
-                       "Package": {
-                               "partOfFactoryDefault": true
-                       },
-                       "extension-key": "documentation"
-               },
-               "typo3/class-alias-loader": {
-                       "class-alias-maps": [
-                               "Migrations/Code/ClassAliasMap.php"
-                       ]
-               }
-       },
-       "autoload": {
-               "psr-4": {
-                       "TYPO3\\CMS\\Documentation\\": "Classes/"
-               }
-       },
-       "autoload-dev": {
-               "psr-4": {
-                       "TYPO3\\CMS\\Documentation\\Tests\\": "Tests/"
-               }
-       }
-}
diff --git a/typo3/sysext/documentation/ext_emconf.php b/typo3/sysext/documentation/ext_emconf.php
deleted file mode 100644 (file)
index 721110f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-$EM_CONF[$_EXTKEY] = [
-    'title' => 'Documentation',
-    'description' => 'Backend module for TYPO3 to list and show documentation of loaded extensions as well as custom documents.',
-    'category' => 'be',
-    'author' => 'TYPO3 Core Team',
-    'author_email' => 'typo3cms@typo3.org',
-    'author_company' => '',
-    'state' => 'stable',
-    'uploadfolder' => '0',
-    'createDirs' => '',
-    'clearCacheOnLoad' => 0,
-    'version' => '9.4.0',
-    'constraints' => [
-        'depends' => [
-            'typo3' => '9.4.0',
-        ],
-        'conflicts' => [],
-        'suggests' => [],
-    ],
-];
diff --git a/typo3/sysext/documentation/ext_localconf.php b/typo3/sysext/documentation/ext_localconf.php
deleted file mode 100644 (file)
index 6ef8e4d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-defined('TYPO3_MODE') or die();
-
-// Open extension manual from within Extension Manager
-\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class)
-    ->connect(
-        \TYPO3\CMS\Extensionmanager\ViewHelpers\ProcessAvailableActionsViewHelper::class,
-        'processActions',
-        \TYPO3\CMS\Documentation\Slots\ExtensionManager::class,
-        'processActions'
-    );
diff --git a/typo3/sysext/documentation/ext_tables.php b/typo3/sysext/documentation/ext_tables.php
deleted file mode 100644 (file)
index 91a95a6..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-defined('TYPO3_MODE') or die();
-
-// Registers a Backend Module
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
-    'TYPO3.CMS.Documentation',
-    'help',
-    'documentation',
-    'top',
-    [
-        'Document' => 'list, download, fetch',
-    ],
-    [
-        'access' => 'user,group',
-        'icon'   => 'EXT:documentation/Resources/Public/Icons/module-documentation.svg',
-        'labels' => 'LLL:EXT:documentation/Resources/Private/Language/locallang_mod.xlf',
-    ]
-);