Skip to content
Snippets Groups Projects
Commit a962de35 authored by Benni Mack's avatar Benni Mack Committed by Susanne Moog
Browse files

[!!!][TASK] Remove ExtJS Pagetree indicator functionality

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: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: default avatarSusanne Moog <susanne.moog@typo3.org>
parent 2003ac5e
No related branches found
No related tags found
No related merge requests found
......@@ -154,23 +154,6 @@ class ExtdirectTreeDataProvider extends \TYPO3\CMS\Backend\Tree\AbstractExtJsTre
return $output;
}
/**
* 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
*
......@@ -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' => [
......
<?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;
}
}
<?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();
}
......@@ -180,9 +180,6 @@ TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, {
}, this);
}
if (TYPO3.Components.PageTree.Configuration.indicator !== '') {
this.addIndicatorItems();
}
this.doLayout();
}, this);
......@@ -190,20 +187,6 @@ TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, {
TYPO3.Components.PageTree.App.superclass.initComponent.apply(this, arguments);
},
/**
* 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
*
......@@ -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();
},
......
.. 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment