[!!!][TASK] Remove ExtJS Pagetree indicator functionality 28/51228/4
authorBenni Mack <benni@typo3.org>
Mon, 9 Jan 2017 21:19:51 +0000 (22:19 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Tue, 10 Jan 2017 10:53:03 +0000 (11:53 +0100)
The ExtJS Page Tree has some functionality to add custom indicators
to the page tree, which is loaded by ExtDirect.

If you wonder what an indicator is, it's the blue box (or some
other HTML content) which is shown if a temporary mount is
shown or if a filter is active.

However, both temporary mount points and filter information
messages are custom, and not handled via the Page Tree.

The functionality is hidden, and was never documented,
and no public extension used this code (not even google found
something).

Therefore I opt to remove it without substitution.

Resolves: #79228
Releases: master
Change-Id: I4097cd3fbbdf736cc2a09e8258199b5aac01a1bc
Reviewed-on: https://review.typo3.org/51228
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/backend/Classes/Tree/Pagetree/ExtdirectTreeDataProvider.php
typo3/sysext/backend/Classes/Tree/Pagetree/Indicator.php [deleted file]
typo3/sysext/backend/Classes/Tree/Pagetree/IndicatorProviderInterface.php [deleted file]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/app.js
typo3/sysext/core/Documentation/Changelog/master/Breaking-79228-RemoveExtJSPagetreeIndicatorFunctionality.rst [new file with mode: 0644]

index 4cb94ca..0ac6b48 100644 (file)
@@ -155,23 +155,6 @@ class ExtdirectTreeDataProvider extends \TYPO3\CMS\Backend\Tree\AbstractExtJsTre
     }
 
     /**
-     * Returns
-     *
-     * @return array
-     */
-    public function getIndicators()
-    {
-        /** @var $indicatorProvider \TYPO3\CMS\Backend\Tree\Pagetree\Indicator */
-        $indicatorProvider = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\Indicator::class);
-        $indicatorHtmlArr = $indicatorProvider->getAllIndicators();
-        $indicator = [
-            'html' => implode(' ', $indicatorHtmlArr),
-            '_COUNT' => count($indicatorHtmlArr)
-        ];
-        return $indicator;
-    }
-
-    /**
      * Returns the language labels and configuration options for the pagetree
      *
      * @return array
@@ -179,7 +162,6 @@ class ExtdirectTreeDataProvider extends \TYPO3\CMS\Backend\Tree\AbstractExtJsTre
     public function loadResources()
     {
         $file = 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:';
-        $indicators = $this->getIndicators();
         $configuration = [
             'LLL' => [
                 'copyHint' => htmlspecialchars($GLOBALS['LANG']->sL($file . 'tree.copyHint')),
@@ -202,7 +184,6 @@ class ExtdirectTreeDataProvider extends \TYPO3\CMS\Backend\Tree\AbstractExtJsTre
                 'displayDeleteConfirmation' => $GLOBALS['BE_USER']->jsConfirmation(JsConfirmation::DELETE),
                 'canDeleteRecursivly' => $GLOBALS['BE_USER']->uc['recursiveDelete'] == true,
                 'disableIconLinkToContextmenu' => $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.disableIconLinkToContextmenu'),
-                'indicator' => $indicators['html'],
                 'temporaryMountPoint' => Commands::getMountPointPath()
             ],
             'Icons' => [
diff --git a/typo3/sysext/backend/Classes/Tree/Pagetree/Indicator.php b/typo3/sysext/backend/Classes/Tree/Pagetree/Indicator.php
deleted file mode 100644 (file)
index d284136..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-namespace TYPO3\CMS\Backend\Tree\Pagetree;
-
-/*
- * 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!
- */
-
-/**
- * Class for pagetree indicator
- */
-class Indicator
-{
-    /**
-     * Indicator Providers
-     *
-     * @var array
-     */
-    protected $indicatorProviders = [];
-
-    /**
-     * Constructor for class tx_reports_report_Status
-     */
-    public function __construct()
-    {
-        $this->getIndicatorProviders();
-    }
-
-    /**
-     * Gets all registered indicator providers and instantiates them
-     */
-    protected function getIndicatorProviders()
-    {
-        $providers = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['pagetree']['t3lib_tree_pagetree']['indicator']['providers'];
-        if (!is_array($providers)) {
-            return;
-        }
-        foreach ($providers as $indicatorProvider) {
-            /** @var $indicatorProviderInstance \TYPO3\CMS\Backend\Tree\Pagetree\IndicatorProviderInterface */
-            $indicatorProviderInstance = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($indicatorProvider);
-            if ($indicatorProviderInstance instanceof \TYPO3\CMS\Backend\Tree\Pagetree\IndicatorProviderInterface) {
-                $this->indicatorProviders[] = $indicatorProviderInstance;
-            }
-        }
-    }
-
-    /**
-     * Runs through all indicator providers and returns all indicators collected.
-     *
-     * @return array An array of
-     */
-    public function getAllIndicators()
-    {
-        $indicators = [];
-        foreach ($this->indicatorProviders as $indicatorProvider) {
-            $indicator = $indicatorProvider->getIndicator();
-            if ($indicator) {
-                $indicators[] = $indicator;
-            }
-        }
-        return $indicators;
-    }
-}
diff --git a/typo3/sysext/backend/Classes/Tree/Pagetree/IndicatorProviderInterface.php b/typo3/sysext/backend/Classes/Tree/Pagetree/IndicatorProviderInterface.php
deleted file mode 100644 (file)
index 200f5f6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-namespace TYPO3\CMS\Backend\Tree\Pagetree;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Interface for classes which provide a pagetree indicator.
- */
-interface IndicatorProviderInterface
-{
-    /**
-     * Returns the indicator html code
-     *
-     * @return string
-     */
-    public function getIndicator();
-}
index 9011d81..092ed56 100644 (file)
@@ -180,9 +180,6 @@ TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, {
                                }, this);
                        }
 
-                       if (TYPO3.Components.PageTree.Configuration.indicator !== '') {
-                               this.addIndicatorItems();
-                       }
                        this.doLayout();
 
                }, this);
@@ -191,20 +188,6 @@ TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, {
        },
 
        /**
-        * Adds the default indicator items
-        *
-        * @return {void}
-        */
-       addIndicatorItems: function() {
-               this.addIndicator({
-                       border: false,
-                       id: this.id + '-indicatorBar-indicatorTitle',
-                       cls: this.id + '-indicatorBar-item',
-                       html: TYPO3.Components.PageTree.Configuration.indicator
-               });
-       },
-
-       /**
         * Adds the temporary mount point indicator item
         *
         * @return {void}
@@ -333,19 +316,6 @@ TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, {
                if (!isNaN(fsMod.recentIds['web']) && fsMod.recentIds['web'] !== '') {
                        this.select(fsMod.recentIds['web'], true);
                }
-
-               TYPO3.Components.PageTree.DataProvider.getIndicators(function(response) {
-                       var indicators = Ext.getCmp(this.id + '-indicatorBar-indicatorTitle');
-                       if (indicators) {
-                               this.removeIndicator(indicators);
-                       }
-
-                       if (response._COUNT > 0) {
-                               TYPO3.Components.PageTree.Configuration.indicator = response.html;
-                               this.addIndicatorItems();
-                       }
-               }, this);
-
                this.activeTree.refreshTree();
        },
 
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-79228-RemoveExtJSPagetreeIndicatorFunctionality.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-79228-RemoveExtJSPagetreeIndicatorFunctionality.rst
new file mode 100644 (file)
index 0000000..63fa16a
--- /dev/null
@@ -0,0 +1,27 @@
+.. include:: ../../Includes.txt
+
+================================================================
+Breaking: #79228 - Remove ExtJS Pagetree indicator functionality
+================================================================
+
+See :issue:`79228`
+
+Description
+===========
+
+The functionality to enhance the page tree with custom indicators has been removed.
+The functionality was never documented and was hidden in the code.
+
+
+Impact
+======
+
+Custom indicators are not shown in the TYPO3 Backend Pagetree anymore.
+
+
+Affected Installations
+======================
+
+Any installation using indicators of the page tree.
+
+.. index:: Backend
\ No newline at end of file