[TASK][FOLLOWUP] Remove leftover ExtJS-related pagetree classes 04/55004/5
authorBenni Mack <benni@typo3.org>
Sat, 9 Dec 2017 19:48:28 +0000 (20:48 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Sat, 9 Dec 2017 23:05:34 +0000 (00:05 +0100)
Some classes regarding ExtJS data providing the tree
can now safely be removed, as they are not in use anymore.

Resolves: #82426
Releases: master
Change-Id: Ic35743154cb8e35b0ddc5a32cd0ec60e68832e0f
Reviewed-on: https://review.typo3.org/55004
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
21 files changed:
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectTreeItems.php
typo3/sysext/backend/Classes/Tree/DraggableAndDropableNodeInterface.php [deleted file]
typo3/sysext/backend/Classes/Tree/EditableNodeLabelInterface.php [deleted file]
typo3/sysext/backend/Classes/Tree/ExtDirectNode.php [deleted file]
typo3/sysext/backend/Classes/Tree/Pagetree/CollectionProcessorInterface.php [deleted file]
typo3/sysext/backend/Classes/Tree/Pagetree/Commands.php [deleted file]
typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php [deleted file]
typo3/sysext/backend/Classes/Tree/Pagetree/ExtdirectTreeDataProvider.php [deleted file]
typo3/sysext/backend/Classes/Tree/Pagetree/PagetreeNode.php [deleted file]
typo3/sysext/backend/Classes/Tree/Pagetree/PagetreeNodeCollection.php [deleted file]
typo3/sysext/backend/Classes/Tree/Renderer/ExtJsJsonTreeRenderer.php [deleted file]
typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
typo3/sysext/backend/Tests/Unit/Tree/Pagetree/DataProviderTest.php [deleted file]
typo3/sysext/core/Classes/Tree/TableConfiguration/ArrayTreeRenderer.php [new file with mode: 0644]
typo3/sysext/core/Classes/Tree/TableConfiguration/ExtJsArrayTreeRenderer.php [deleted file]
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-82426-ExtJSAndExtDirectRemoval.rst
typo3/sysext/core/Migrations/Code/ClassAliasMap.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php
typo3/sysext/workspaces/Classes/Hooks/PagetreeCollectionsProcessor.php [deleted file]
typo3/sysext/workspaces/ext_localconf.php

index 3ec43b6..1da6d7a 100644 (file)
@@ -17,7 +17,7 @@ namespace TYPO3\CMS\Backend\Form\FormDataProvider;
 use TYPO3\CMS\Backend\Form\FormDataProviderInterface;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Tree\TableConfiguration\ExtJsArrayTreeRenderer;
+use TYPO3\CMS\Core\Tree\TableConfiguration\ArrayTreeRenderer;
 use TYPO3\CMS\Core\Tree\TableConfiguration\TableConfigurationTree;
 use TYPO3\CMS\Core\Tree\TableConfiguration\TreeDataProviderFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -174,7 +174,7 @@ class TcaSelectTreeItems extends AbstractItemProvider implements FormDataProvide
                 // tree representing the nested tree, just to collapse all that to a flat array again. Yay ...
                 $treeDataProvider->setItemWhiteList($uidListOfAllDynamicItems);
                 $treeDataProvider->initializeTreeData();
-                $treeRenderer = GeneralUtility::makeInstance(ExtJsArrayTreeRenderer::class);
+                $treeRenderer = GeneralUtility::makeInstance(ArrayTreeRenderer::class);
                 $tree = GeneralUtility::makeInstance(TableConfigurationTree::class);
                 $tree->setDataProvider($treeDataProvider);
                 $tree->setNodeRenderer($treeRenderer);
diff --git a/typo3/sysext/backend/Classes/Tree/DraggableAndDropableNodeInterface.php b/typo3/sysext/backend/Classes/Tree/DraggableAndDropableNodeInterface.php
deleted file mode 100644 (file)
index 163f7eb..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-namespace TYPO3\CMS\Backend\Tree;
-
-/*
- * 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!
- */
-
-/**
- * Describes necessary methods if the nodes are draggable and dropable
- * within the tree.
- */
-interface DraggableAndDropableNodeInterface
-{
-    /**
-     * Moves given node inside a destination node
-     *
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $destination
-     */
-    public function moveNodeInDestinationNode($node, $destination);
-
-    /**
-     * Moves given node after a destination node
-     *
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $destination
-     */
-    public function moveNodeAfterDestinationNode($node, $destination);
-
-    /**
-     * Copies given node inside a destination node
-     *
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $destination
-     */
-    public function copyNodeInDestinationNode($node, $destination);
-
-    /**
-     * Copies given node after a destination node
-     *
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $destination
-     */
-    public function copyNodeAfterDestinationNode($node, $destination);
-}
diff --git a/typo3/sysext/backend/Classes/Tree/EditableNodeLabelInterface.php b/typo3/sysext/backend/Classes/Tree/EditableNodeLabelInterface.php
deleted file mode 100644 (file)
index 3275481..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-namespace TYPO3\CMS\Backend\Tree;
-
-/*
- * 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!
- */
-
-/**
- * Describes necessary methods if the node label should be editable
- * within the tree.
- */
-interface EditableNodeLabelInterface
-{
-    /**
-     * Sets the new label
-     *
-     * @param string $label
-     */
-    public function setLabel($label);
-}
diff --git a/typo3/sysext/backend/Classes/Tree/ExtDirectNode.php b/typo3/sysext/backend/Classes/Tree/ExtDirectNode.php
deleted file mode 100644 (file)
index 6bb8e91..0000000
+++ /dev/null
@@ -1,687 +0,0 @@
-<?php
-namespace TYPO3\CMS\Backend\Tree;
-
-/*
- * 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;
-
-/**
- * Node for the usage with ExtDirect and ExtJS
- */
-class ExtDirectNode extends \TYPO3\CMS\Backend\Tree\TreeNode
-{
-    /**
-     * Node type
-     *
-     * @var string
-     */
-    protected $type = '';
-
-    /**
-     * Leaf Node Indicator
-     *
-     * @var bool
-     */
-    protected $leaf = true;
-
-    /**
-     * Indicator if the node is expanded
-     *
-     * @var bool
-     */
-    protected $expanded = false;
-
-    /**
-     * Indicator if the node can be expanded
-     *
-     * @var bool
-     */
-    protected $expandable = false;
-
-    /**
-     * Indicator if the node is draggable
-     *
-     * @var bool
-     */
-    protected $draggable = true;
-
-    /**
-     * Indicator if the node is allowed as a drop target
-     *
-     * @var bool
-     */
-    protected $isDropTarget = true;
-
-    /**
-     * Label
-     *
-     * @var string
-     */
-    protected $text = '';
-
-    /**
-     * Editable Label text
-     *
-     * @var string
-     */
-    protected $editableText = '';
-
-    /**
-     * Prefix text of the label
-     *
-     * @var string
-     */
-    protected $prefix = '';
-
-    /**
-     * Suffix text of the label
-     *
-     * @var string
-     */
-    protected $suffix = '';
-
-    /**
-     * CSS Class
-     *
-     * @var string
-     */
-    protected $cls = '';
-
-    /**
-     * Quick Tip
-     *
-     * @var string
-     */
-    protected $qtip = '';
-
-    /**
-     * Sprite Icon HTML
-     *
-     * @var string
-     */
-    protected $spriteIconCode = '';
-
-    /**
-     * Icon
-     *
-     * @var Icon
-     */
-    protected $icon;
-
-    /**
-     * Text source field (title, nav_title, ...)
-     *
-     * @var string
-     */
-    protected $t3TextSourceField = '';
-
-    /**
-     * Indicator if the copy mode is activated
-     *
-     * @var bool
-     */
-    protected $t3InCopyMode = false;
-
-    /**
-     * Indicator if the cut mode is activated
-     *
-     * @var bool
-     */
-    protected $t3InCutMode = false;
-
-    /**
-     * Database record (not serialized or merged into the result array!)
-     *
-     * @var array
-     */
-    protected $record = [];
-
-    /**
-     * Context Info
-     *
-     * @var array
-     */
-    protected $contextInfo = [];
-
-    /**
-     * Indicator if the label is editable
-     *
-     * @var bool
-     */
-    protected $labelIsEditable = true;
-
-    /**
-     * Indicator if the node can have children's
-     *
-     * @var bool
-     */
-    protected $allowChildren = true;
-
-    /**
-     * Page URL Alias
-     *
-     * @var string
-     */
-    protected $alias = '';
-
-    /**
-     * Set's the node type
-     *
-     * @param string $type
-     */
-    public function setType($type)
-    {
-        $this->type = $type;
-    }
-
-    /**
-     * Returns the node type
-     *
-     * @return string
-     */
-    public function getType()
-    {
-        return $this->type;
-    }
-
-    /**
-     * Sets the leaf node indicator
-     *
-     * @param bool $isLeaf
-     */
-    public function setLeaf($isLeaf)
-    {
-        $this->leaf = $isLeaf == true;
-    }
-
-    /**
-     * Returns if the node is a leaf node
-     *
-     * @return bool
-     */
-    public function isLeafNode()
-    {
-        return $this->leaf;
-    }
-
-    /**
-     * Sets the expandable indicator
-     *
-     * @param bool $expandable
-     */
-    public function setExpandable($expandable)
-    {
-        $this->expandable = $expandable == true;
-    }
-
-    /**
-     * Returns the expandable indicator
-     *
-     * @return bool
-     */
-    public function isExpandable()
-    {
-        return $this->expandable;
-    }
-
-    /**
-     * Sets the expanded indicator
-     *
-     * @param bool $expanded
-     */
-    public function setExpanded($expanded)
-    {
-        $this->expanded = $expanded == true;
-    }
-
-    /**
-     * Returns the expanded indicator
-     *
-     * @return bool
-     */
-    public function isExpanded()
-    {
-        if ($this->isLeafNode()) {
-            return true;
-        }
-        return $this->expanded;
-    }
-
-    /**
-     * Sets the draggable indicator
-     *
-     * @param bool $draggable
-     */
-    public function setDraggable($draggable)
-    {
-        $this->draggable = $draggable == true;
-    }
-
-    /**
-     * Returns the draggable indicator
-     *
-     * @return bool
-     */
-    public function isDraggable()
-    {
-        return $this->draggable;
-    }
-
-    /**
-     * Sets the indicator if the node can be a drop target
-     *
-     * @param bool $isDropTarget
-     */
-    public function setIsDropTarget($isDropTarget)
-    {
-        $this->isDropTarget = $isDropTarget == true;
-    }
-
-    /**
-     * Returns the indicator if the node is a drop target
-     *
-     * @return bool
-     */
-    public function isDropTarget()
-    {
-        return $this->isDropTarget;
-    }
-
-    /**
-     * Sets the label of the node with the source field and the prefix
-     *
-     * @param string $text
-     * @param string $textSourceField
-     * @param string $prefix
-     * @param string $suffix
-     */
-    public function setText($text, $textSourceField = 'title', $prefix = '', $suffix = '')
-    {
-        $this->text = $text;
-        $this->t3TextSourceField = $textSourceField;
-        $this->prefix = $prefix;
-        $this->suffix = $suffix;
-    }
-
-    /**
-     * Returns the label
-     *
-     * @return string
-     */
-    public function getText()
-    {
-        return $this->text;
-    }
-
-    /**
-     * Sets the editable text
-     *
-     * @param string $editableText
-     */
-    public function setEditableText($editableText)
-    {
-        $this->editableText = $editableText;
-    }
-
-    /**
-     * Returns the editable text
-     *
-     * @return string
-     */
-    public function getEditableText()
-    {
-        return $this->editableText;
-    }
-
-    /**
-     * Returns the source field of the label
-     *
-     * @return string
-     */
-    public function getTextSourceField()
-    {
-        return $this->t3TextSourceField;
-    }
-
-    /**
-     * Sets the paste copy indicator
-     *
-     * @param bool $inCopyMode
-     */
-    public function setInCopyMode($inCopyMode)
-    {
-        $this->t3InCopyMode = $inCopyMode == true;
-    }
-
-    /**
-     * Returns the copy mode indicator
-     *
-     * @return bool
-     */
-    public function isInCopyMode()
-    {
-        return $this->t3InCopyMode;
-    }
-
-    /**
-     * Sets the paste cut indicator
-     *
-     * @param bool $inCutMode
-     */
-    public function setInCutMode($inCutMode)
-    {
-        $this->t3InCutMode = $inCutMode == true;
-    }
-
-    /**
-     * Returns the cut mode indicator
-     *
-     * @return bool
-     */
-    public function isInCutMode()
-    {
-        return $this->t3InCutMode;
-    }
-
-    /**
-     * Returns the prefix text of the label
-     *
-     * @return string
-     */
-    public function getPrefix()
-    {
-        return $this->prefix;
-    }
-
-    /**
-     * Returns the suffix text of the label
-     *
-     * @return string
-     */
-    public function getSuffix()
-    {
-        return $this->suffix;
-    }
-
-    /**
-     * Sets the css class(es)
-     *
-     * @param string $class
-     */
-    public function setCls($class)
-    {
-        $this->cls = $class;
-    }
-
-    /**
-     * Returns the css class(es)
-     *
-     * @return string
-     */
-    public function getCls()
-    {
-        return $this->cls;
-    }
-
-    /**
-     * Sets the quick tip
-     *
-     * @param string $qtip
-     */
-    public function setQTip($qtip)
-    {
-        $this->qtip = $qtip;
-    }
-
-    /**
-     * Returns the quick tip
-     *
-     * @return string
-     */
-    public function getQTip()
-    {
-        return $this->qtip;
-    }
-
-    /**
-     * Sets the sprite icon code
-     *
-     * @param string $spriteIcon
-     */
-    public function setSpriteIconCode($spriteIcon)
-    {
-        $this->spriteIconCode = $spriteIcon;
-    }
-
-    /**
-     * Returns the sprite icon code
-     *
-     * @return string
-     */
-    public function getSpriteIconCode()
-    {
-        return $this->spriteIconCode;
-    }
-
-    /**
-     * Sets the node icon
-     *
-     * @param Icon $icon
-     */
-    public function setIcon(Icon $icon)
-    {
-        $this->icon = $icon;
-    }
-
-    /**
-     * Returns the icon
-     *
-     * @return Icon
-     */
-    public function getIcon()
-    {
-        return $this->icon;
-    }
-
-    /**
-     * Sets the indicator if the label is editable
-     *
-     * @param bool $labelIsEditable
-     */
-    public function setLabelIsEditable($labelIsEditable)
-    {
-        $this->labelIsEditable = $labelIsEditable == true;
-    }
-
-    /**
-     * Returns the editable label indicator
-     *
-     * @return bool
-     */
-    public function isLabelEditable()
-    {
-        return $this->labelIsEditable;
-    }
-
-    /**
-     * Sets the database record array
-     *
-     * @param array $record
-     */
-    public function setRecord($record)
-    {
-        $this->record = (array)$record;
-    }
-
-    /**
-     * Returns the database record array
-     *
-     * @return array
-     */
-    public function getRecord()
-    {
-        return $this->record;
-    }
-
-    /**
-     * Sets the context info
-     *
-     * @param array $contextInfo
-     */
-    public function setContextInfo($contextInfo)
-    {
-        $this->contextInfo = (array)$contextInfo;
-    }
-
-    /**
-     * Returns the context info
-     *
-     * @return array
-     */
-    public function getContextInfo()
-    {
-        return (array)$this->contextInfo;
-    }
-
-    /**
-     * Sets the child nodes collection
-     *
-     * @param \TYPO3\CMS\Backend\Tree\TreeNodeCollection $childNodes
-     */
-    public function setChildNodes(\TYPO3\CMS\Backend\Tree\TreeNodeCollection $childNodes)
-    {
-        parent::setChildNodes($childNodes);
-        if ($childNodes->count()) {
-            $this->setLeaf(false);
-        }
-    }
-
-    /**
-     * Sets the indicator if the node can have child nodes
-     *
-     * @param bool $allowChildren
-     */
-    public function setAllowChildren($allowChildren)
-    {
-        $this->allowChildren = $allowChildren == true;
-    }
-
-    /**
-     * Checks if the node can have child nodes
-     *
-     * @return bool
-     */
-    public function canHaveChildren()
-    {
-        return $this->allowChildren;
-    }
-
-    /**
-     * Returns alias
-     *
-     * @return string
-     */
-    public function getAlias()
-    {
-        return $this->alias;
-    }
-
-    /**
-     * Sets alias
-     *
-     * @param string $alias
-     */
-    public function setAlias(string $alias)
-    {
-        $this->alias = $alias;
-    }
-
-    /**
-     * Returns the node in an array representation that can be used for serialization
-     *
-     * @param bool $addChildNodes
-     * @return array
-     */
-    public function toArray($addChildNodes = true)
-    {
-        $arrayRepresentation = [
-            'serializeClassName' => static::class,
-            'id' => $this->getId(),
-            'type' => $this->getType(),
-            'editableText' => $this->getEditableText(),
-            'text' => $this->getPrefix() . $this->getText() . $this->getSuffix(),
-            'alias' => $this->getAlias(),
-            'cls' => $this->getCls(),
-            'prefix' => $this->getPrefix(),
-            'suffix' => $this->getSuffix(),
-            'qtip' => $this->getQTip(),
-            'expanded' => $this->isExpanded(),
-            'expandable' => $this->isExpandable(),
-            'draggable' => $this->isDraggable(),
-            'isTarget' => $this->isDropTarget(),
-            'spriteIconCode' => $this->getSpriteIconCode(),
-            'icon' => $this->getIcon()->getIdentifier(),
-            'overlayIcon' => $this->getIcon()->getOverlayIcon() ? $this->getIcon()->getOverlayIcon()->getIdentifier() : '',
-            't3TextSourceField' => $this->getTextSourceField(),
-            't3InCopyMode' => $this->isInCopyMode(),
-            't3InCutMode' => $this->isInCutMode(),
-            't3ContextInfo' => $this->getContextInfo(),
-            'editable' => $this->isLabelEditable(),
-            'allowChildren' => $this->canHaveChildren()
-        ];
-        // only set the leaf attribute if the node has children's,
-        // otherwise you cannot add child's to real leaf nodes
-        if (!$this->isLeafNode()) {
-            $arrayRepresentation['leaf'] = false;
-        }
-        // Some strange environment thingy prevents
-        // the direct copy of an array into an index of the same array
-        $copy = $arrayRepresentation;
-        $arrayRepresentation['nodeData'] = $copy;
-        if ($this->hasChildNodes()) {
-            $arrayRepresentation['children'] = $this->childNodes->toArray();
-        }
-        return $arrayRepresentation;
-    }
-
-    /**
-     * Sets data of the node by a given data array
-     *
-     * @param array $data
-     */
-    public function dataFromArray($data)
-    {
-        parent::dataFromArray($data);
-        $this->setType($data['type']);
-        $this->setText($data['label'], $data['t3TextSourceField'], $data['prefix'], $data['suffix']);
-        $this->setEditableText($data['editableText']);
-        $this->setCls($data['cls']);
-        $this->setQTip($data['qtip']);
-        $this->setExpanded($data['expanded']);
-        $this->setExpandable($data['expandable']);
-        $this->setDraggable($data['draggable']);
-        $this->setIsDropTarget($data['isTarget']);
-        $this->setSpriteIconCode($data['spriteIconCode']);
-        $this->setInCopyMode($data['t3InCopyMode']);
-        $this->setInCutMode($data['t3InCutMode']);
-        $this->setContextInfo($data['t3ContextInfo']);
-        $this->setLabelIsEditable($data['editable']);
-        $this->setAllowChildren($data['allowChildren']);
-        // only set the leaf attribute if it's applied
-        // otherwise you cannot insert nodes into this one
-        if (isset($data['leaf'])) {
-            $this->setLeaf(false);
-        }
-    }
-}
diff --git a/typo3/sysext/backend/Classes/Tree/Pagetree/CollectionProcessorInterface.php b/typo3/sysext/backend/Classes/Tree/Pagetree/CollectionProcessorInterface.php
deleted file mode 100644 (file)
index 0a55bbc..0000000
+++ /dev/null
@@ -1,49 +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 perform pre or post processing
- */
-interface CollectionProcessorInterface
-{
-    /**
-     * Post process the subelement collection of a specific node
-     *
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
-     * @param int $mountPoint
-     * @param int $level
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection $nodeCollection
-     */
-    public function postProcessGetNodes($node, $mountPoint, $level, $nodeCollection);
-
-    /**
-     * Post process the subelement collection of a specific node-filter combination
-     *
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
-     * @param string $searchFilter
-     * @param int $mountPoint
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection $nodeCollection
-     */
-    public function postProcessFilteredNodes($node, $searchFilter, $mountPoint, $nodeCollection);
-
-    /**
-     * Post process the collection of tree mounts
-     *
-     * @param string $searchFilter
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection $nodeCollection
-     */
-    public function postProcessGetTreeMounts($searchFilter, $nodeCollection);
-}
diff --git a/typo3/sysext/backend/Classes/Tree/Pagetree/Commands.php b/typo3/sysext/backend/Classes/Tree/Pagetree/Commands.php
deleted file mode 100644 (file)
index f0e97de..0000000
+++ /dev/null
@@ -1,373 +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!
- */
-
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\MathUtility;
-use TYPO3\CMS\Core\Versioning\VersionState;
-
-/**
- * Page Tree and Context Menu Commands
- */
-class Commands
-{
-    /**
-     * @var bool|null
-     */
-    protected static $useNavTitle = null;
-
-    /**
-     * @var bool|null
-     */
-    protected static $addIdAsPrefix = null;
-
-    /**
-     * @var bool|null
-     */
-    protected static $addDomainName = null;
-
-    /**
-     * @var array|null
-     */
-    protected static $backgroundColors = null;
-
-    /**
-     * @var int|null
-     */
-    protected static $titleLength = null;
-
-    /**
-     * Visibly the page
-     *
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
-     */
-    public static function visiblyNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node)
-    {
-        $data['pages'][$node->getWorkspaceId()]['hidden'] = 0;
-        self::processTceCmdAndDataMap([], $data);
-    }
-
-    /**
-     * Hide the page
-     *
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
-     */
-    public static function disableNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node)
-    {
-        $data['pages'][$node->getWorkspaceId()]['hidden'] = 1;
-        self::processTceCmdAndDataMap([], $data);
-    }
-
-    /**
-     * Delete the page
-     *
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
-     */
-    public static function deleteNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node)
-    {
-        $cmd['pages'][$node->getId()]['delete'] = 1;
-        self::processTceCmdAndDataMap($cmd);
-    }
-
-    /**
-     * Restore the page
-     *
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
-     * @param int $targetId
-     */
-    public static function restoreNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node, $targetId)
-    {
-        $cmd['pages'][$node->getId()]['undelete'] = 1;
-        self::processTceCmdAndDataMap($cmd);
-        if ($node->getId() !== $targetId) {
-            self::moveNode($node, $targetId);
-        }
-    }
-
-    /**
-     * Updates the node label
-     *
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
-     * @param string $updatedLabel
-     */
-    public static function updateNodeLabel(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node, $updatedLabel)
-    {
-        if ($GLOBALS['BE_USER']->checkLanguageAccess(0)) {
-            $data['pages'][$node->getWorkspaceId()][$node->getTextSourceField()] = $updatedLabel;
-            self::processTceCmdAndDataMap([], $data);
-        } else {
-            throw new \RuntimeException(implode(LF, ['Editing title of page id \'' . $node->getWorkspaceId() . '\' failed. Editing default language is not allowed.']), 1365513336);
-        }
-    }
-
-    /**
-     * Copies a page and returns the id of the new page
-     *
-     * Node: Use a negative target id to specify a sibling target else the parent is used
-     *
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $sourceNode
-     * @param int $targetId
-     * @return int
-     */
-    public static function copyNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $sourceNode, $targetId)
-    {
-        $cmd['pages'][$sourceNode->getId()]['copy'] = $targetId;
-        $returnValue = self::processTceCmdAndDataMap($cmd);
-        return $returnValue['pages'][$sourceNode->getId()];
-    }
-
-    /**
-     * Moves a page
-     *
-     * Node: Use a negative target id to specify a sibling target else the parent is used
-     *
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $sourceNode
-     * @param int $targetId
-     */
-    public static function moveNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $sourceNode, $targetId)
-    {
-        $cmd['pages'][$sourceNode->getId()]['move'] = $targetId;
-        self::processTceCmdAndDataMap($cmd);
-    }
-
-    /**
-     * Creates a page of the given doktype and returns the id of the created page
-     *
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $parentNode
-     * @param int $targetId
-     * @param int $pageType
-     * @return int
-     */
-    public static function createNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $parentNode, $targetId, $pageType)
-    {
-        $placeholder = 'NEW12345';
-        $pid = (int)$parentNode->getWorkspaceId();
-        $targetId = (int)$targetId;
-
-        // Use page TsConfig as default page initialization
-        $pageTs = BackendUtility::getPagesTSconfig($pid);
-        if (array_key_exists('TCAdefaults.', $pageTs) && array_key_exists('pages.', $pageTs['TCAdefaults.'])) {
-            $data['pages'][$placeholder] = $pageTs['TCAdefaults.']['pages.'];
-        } else {
-            $data['pages'][$placeholder] = [];
-        }
-
-        $data['pages'][$placeholder]['pid'] = $pid;
-        $data['pages'][$placeholder]['doktype'] = $pageType;
-        $data['pages'][$placeholder]['title'] = htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:tree.defaultPageTitle'));
-        $newPageId = self::processTceCmdAndDataMap([], $data);
-        $node = self::getNode($newPageId[$placeholder]);
-        if ($pid !== $targetId) {
-            self::moveNode($node, $targetId);
-        }
-
-        return $newPageId[$placeholder];
-    }
-
-    /**
-     * Process DataHandler commands and data maps
-     *
-     * Command Map:
-     * Used for moving, recover, remove and some more operations.
-     *
-     * Data Map:
-     * Used for creating and updating records,
-     *
-     * This API contains all necessary access checks.
-     *
-     * @param array $cmd
-     * @param array $data
-     * @return array
-     * @throws \RuntimeException if an error happened while the TCE processing
-     */
-    protected static function processTceCmdAndDataMap(array $cmd, array $data = [])
-    {
-        /** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
-        $tce = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
-        $tce->start($data, $cmd);
-        $tce->copyTree = MathUtility::forceIntegerInRange($GLOBALS['BE_USER']->uc['copyLevels'], 0, 100);
-        if (!empty($cmd)) {
-            $tce->process_cmdmap();
-            $returnValues = $tce->copyMappingArray_merged;
-        } elseif (!empty($data)) {
-            $tce->process_datamap();
-            $returnValues = $tce->substNEWwithIDs;
-        } else {
-            $returnValues = [];
-        }
-        // check errors
-        if (!empty($tce->errorLog)) {
-            throw new \RuntimeException(implode(LF, $tce->errorLog), 1333754629);
-        }
-        return $returnValues;
-    }
-
-    /**
-     * Returns a node from the given node id
-     *
-     * @param int $nodeId
-     * @param bool $unsetMovePointers
-     * @return \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode
-     */
-    public static function getNode($nodeId, $unsetMovePointers = true)
-    {
-        $record = BackendUtility::getRecordWSOL('pages', $nodeId, '*', '', true, $unsetMovePointers);
-        return self::getNewNode($record);
-    }
-
-    /**
-     * Returns the mount point path for a temporary mount or the given id
-     *
-     * @param int $uid
-     * @return string
-     */
-    public static function getMountPointPath($uid = -1)
-    {
-        if ($uid === -1) {
-            $uid = (int)$GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint'];
-        }
-        if ($uid <= 0) {
-            return '';
-        }
-        if (self::$useNavTitle === null) {
-            self::$useNavTitle = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showNavTitle');
-        }
-        $rootline = array_reverse(BackendUtility::BEgetRootLine($uid));
-        array_shift($rootline);
-        $path = [];
-        foreach ($rootline as $rootlineElement) {
-            $record = BackendUtility::getRecordWSOL('pages', $rootlineElement['uid'], 'title, nav_title', '', true, true);
-            $text = $record['title'];
-            if (self::$useNavTitle && trim($record['nav_title']) !== '') {
-                $text = $record['nav_title'];
-            }
-            $path[] = htmlspecialchars($text);
-        }
-        return '/' . implode('/', $path);
-    }
-
-    /**
-     * Returns the first configured domain name for a page
-     *
-     * @param int $uid
-     * @return string
-     */
-    public static function getDomainName($uid)
-    {
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getQueryBuilderForTable('sys_domain');
-        $domain = $queryBuilder
-            ->select('domainName')
-            ->from('sys_domain')
-            ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)))
-            ->setMaxResults(1)
-            ->orderBy('sorting')
-        ->execute()
-        ->fetch();
-        return is_array($domain) ? htmlspecialchars($domain['domainName']) : '';
-    }
-
-    /**
-     * Creates a node with the given record information
-     *
-     * @param array $record
-     * @param int $mountPoint
-     * @return \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode
-     */
-    public static function getNewNode($record, $mountPoint = 0)
-    {
-        $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-        if (self::$titleLength === null) {
-            self::$useNavTitle = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showNavTitle');
-            self::$addIdAsPrefix = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showPageIdWithTitle');
-            self::$addDomainName = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showDomainNameWithTitle');
-            self::$backgroundColors = $GLOBALS['BE_USER']->getTSConfigProp('options.pageTree.backgroundColor');
-            self::$titleLength = (int)$GLOBALS['BE_USER']->uc['titleLen'];
-        }
-        /** @var $subNode \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
-        $subNode = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode::class);
-        $subNode->setRecord($record);
-        $subNode->setCls($record['_CSSCLASS']);
-        $subNode->setType('pages');
-        $subNode->setId($record['uid']);
-        $subNode->setStopPageTree($record['php_tree_stop']);
-        $subNode->setMountPoint($mountPoint);
-        $subNode->setWorkspaceId($record['_ORIG_uid'] ?: $record['uid']);
-        $subNode->setBackgroundColor(self::$backgroundColors[$record['uid']]);
-        $subNode->setAlias($record['alias'] ?? '');
-        $field = 'title';
-        $text = $record['title'];
-        if (self::$useNavTitle && trim($record['nav_title']) !== '') {
-            $field = 'nav_title';
-            $text = $record['nav_title'];
-        }
-        if (trim($text) === '') {
-            $visibleText = '[' . htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.no_title')) . ']';
-        } else {
-            $visibleText = $text;
-        }
-        $visibleText = GeneralUtility::fixed_lgd_cs($visibleText, self::$titleLength);
-        $suffix = '';
-        if (self::$addDomainName) {
-            $domain = self::getDomainName($record['uid']);
-            $suffix = $domain !== '' ? ' [' . $domain . ']' : '';
-        }
-        $qtip = str_replace(' - ', PHP_EOL, htmlspecialchars(BackendUtility::titleAttribForPages($record, '', false)));
-        $prefix = '';
-        $lockInfo = BackendUtility::isRecordLocked('pages', $record['uid']);
-        if (is_array($lockInfo)) {
-            $qtip .= PHP_EOL . htmlspecialchars($lockInfo['msg']);
-            $prefix .= '<span class="typo3-pagetree-status">' . $iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '</span>';
-        }
-        // Call stats information hook
-        $stat = '';
-
-        $_params = ['pages', $record['uid']];
-        $fakeThis = null;
-        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] ?? [] as $_funcRef) {
-            $stat .= GeneralUtility::callUserFunction($_funcRef, $_params, $fakeThis);
-        }
-
-        $prefix .= htmlspecialchars(self::$addIdAsPrefix ? '[' . $record['uid'] . '] ' : '');
-        $subNode->setEditableText($text);
-        $subNode->setText(htmlspecialchars($visibleText), $field, $prefix, htmlspecialchars($suffix) . $stat);
-        $subNode->setQTip($qtip);
-        if ((int)$record['uid'] !== 0) {
-            $icon = $iconFactory->getIconForRecord('pages', $record, Icon::SIZE_SMALL);
-        } else {
-            $icon = $iconFactory->getIcon('apps-pagetree-root', Icon::SIZE_SMALL);
-        }
-        $subNode->setIcon($icon);
-        $subNode->setSpriteIconCode($icon->render());
-        if (
-            !$subNode->canCreateNewPages()
-            || VersionState::cast($record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
-        ) {
-            $subNode->setIsDropTarget(false);
-        }
-        if (
-            !$subNode->canBeEdited()
-            || !$subNode->canBeRemoved()
-            || VersionState::cast($record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
-        ) {
-            $subNode->setDraggable(false);
-        }
-        return $subNode;
-    }
-}
diff --git a/typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php b/typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php
deleted file mode 100644 (file)
index 3a3094f..0000000
+++ /dev/null
@@ -1,564 +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!
- */
-
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\QueryBuilder;
-use TYPO3\CMS\Core\Database\Query\QueryHelper;
-use TYPO3\CMS\Core\Database\Query\Restriction\BackendWorkspaceRestriction;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Page tree data provider.
- */
-class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider
-{
-    /**
-     * Node limit that should be loaded for this request per mount
-     *
-     * @var int
-     */
-    protected $nodeLimit = 0;
-
-    /**
-     * Current amount of nodes
-     *
-     * @var int
-     */
-    protected $nodeCounter = 0;
-
-    /**
-     * TRUE to show the path of each mountpoint in the tree
-     *
-     * @var bool
-     */
-    protected $showRootlineAboveMounts = false;
-
-    /**
-     * Hidden Records
-     *
-     * @var array<string>
-     */
-    protected $hiddenRecords = [];
-
-    /**
-     * Process collection hook objects
-     *
-     * @var array<\TYPO3\CMS\Backend\Tree\Pagetree\CollectionProcessorInterface>
-     */
-    protected $processCollectionHookObjects = [];
-
-    /**
-     * Constructor
-     *
-     * @param int $nodeLimit (optional)
-     */
-    public function __construct($nodeLimit = null)
-    {
-        $nodeLimit = $nodeLimit ?? $GLOBALS['TYPO3_CONF_VARS']['BE']['pageTree']['preloadLimit'];
-        $this->nodeLimit = abs((int)$nodeLimit);
-
-        $this->showRootlineAboveMounts = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showPathAboveMounts');
-
-        $this->hiddenRecords = GeneralUtility::trimExplode(',', $GLOBALS['BE_USER']->getTSConfigVal('options.hideRecords.pages'));
-        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'] ?? [] as $className) {
-            /** @var $hookObject \TYPO3\CMS\Backend\Tree\Pagetree\CollectionProcessorInterface */
-            $hookObject = GeneralUtility::makeInstance($className);
-            if ($hookObject instanceof \TYPO3\CMS\Backend\Tree\Pagetree\CollectionProcessorInterface) {
-                $this->processCollectionHookObjects[] = $hookObject;
-            }
-        }
-    }
-
-    /**
-     * Returns the root node.
-     *
-     * @return \TYPO3\CMS\Backend\Tree\TreeNode the root node
-     */
-    public function getRoot()
-    {
-        /** @var $node \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
-        $node = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode::class);
-        $node->setId('root');
-        $node->setExpanded(true);
-        return $node;
-    }
-
-    /**
-     * Fetches the sub-nodes of the given node
-     *
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
-     * @param int $mountPoint
-     * @param int $level internally used variable as a recursion limiter
-     * @return \TYPO3\CMS\Backend\Tree\TreeNodeCollection
-     */
-    public function getNodes(\TYPO3\CMS\Backend\Tree\TreeNode $node, $mountPoint = 0, $level = 0)
-    {
-        /** @var $nodeCollection \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection */
-        $nodeCollection = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection::class);
-        if ($level >= 99 || ($node->getStopPageTree() && $node->getId() !== $mountPoint)) {
-            return $nodeCollection;
-        }
-        $isVirtualRootNode = false;
-        $subpages = $this->getSubpages($node->getId());
-        // check if fetching subpages the "root"-page
-        // and in case of a virtual root return the mountpoints as virtual "subpages"
-        if ((int)$node->getId() === 0) {
-            // check no temporary mountpoint is used
-            if (!(int)$GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint']) {
-                $mountPoints = array_map('intval', $GLOBALS['BE_USER']->returnWebmounts());
-                $mountPoints = array_unique($mountPoints);
-                if (!in_array(0, $mountPoints, true)) {
-                    // using a virtual root node
-                    // so then return the mount points here as "subpages" of the first node
-                    $isVirtualRootNode = true;
-                    $subpages = [];
-                    foreach ($mountPoints as $webMountPoint) {
-                        $subpage = BackendUtility::getRecordWSOL('pages', $webMountPoint, '*', '', true, true);
-                        $subpage['isMountPoint'] = true;
-                        $subpages[] = $subpage;
-                    }
-                }
-            }
-        }
-        if (is_array($subpages) && !empty($subpages)) {
-            $lastRootline = [];
-            foreach ($subpages as $subpage) {
-                if (in_array($subpage['t3ver_oid'] ?: $subpage['uid'], $this->hiddenRecords)) {
-                    continue;
-                }
-                // must be calculated before getRecordWSOL(),
-                // because the information is lost otherwise
-                $isMountPoint = $subpage['isMountPoint'] === true;
-                if ($isVirtualRootNode) {
-                    $mountPoint = (int)$subpage['t3ver_oid'] ?: $subpage['uid'];
-                }
-                $subNode = Commands::getNewNode($subpage, $mountPoint);
-                $subNode->setIsMountPoint($isMountPoint);
-                if ($isMountPoint && $this->showRootlineAboveMounts) {
-                    if ($subpage['pid'] > 0) {
-                        $rootline = Commands::getMountPointPath($subpage['pid']);
-                    } else {
-                        $rootline = Commands::getMountPointPath($subpage['uid']);
-                    }
-                    if ($lastRootline !== $rootline) {
-                        $subNode->setReadableRootline($rootline);
-                    }
-                    $lastRootline = $rootline;
-                }
-                if ($this->nodeCounter < $this->nodeLimit) {
-                    $childNodes = $this->getNodes($subNode, $mountPoint, $level + 1);
-                    $subNode->setChildNodes($childNodes);
-                    $this->nodeCounter += $childNodes->count();
-                } else {
-                    $subNode->setLeaf(!$this->hasNodeSubPages((int)$subNode->getId()));
-                }
-                if (!$GLOBALS['BE_USER']->isAdmin() && (int)$subpage['editlock'] === 1) {
-                    $subNode->setLabelIsEditable(false);
-                }
-                $nodeCollection->append($subNode);
-            }
-        }
-        foreach ($this->processCollectionHookObjects as $hookObject) {
-            /** @var $hookObject \TYPO3\CMS\Backend\Tree\Pagetree\CollectionProcessorInterface */
-            $hookObject->postProcessGetNodes($node, $mountPoint, $level, $nodeCollection);
-        }
-        return $nodeCollection;
-    }
-
-    /**
-     * Returns a node collection of filtered nodes
-     *
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
-     * @param string $searchFilter
-     * @param int $mountPoint
-     * @return \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection the filtered nodes
-     */
-    public function getFilteredNodes(\TYPO3\CMS\Backend\Tree\TreeNode $node, $searchFilter, $mountPoint = 0)
-    {
-        /** @var $nodeCollection \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection */
-        $nodeCollection = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection::class);
-        $records = $this->getPagesByQuery($searchFilter);
-        if (!is_array($records) || empty($records)) {
-            return $nodeCollection;
-        }
-        if (count($records) > 500) {
-            return $nodeCollection;
-        }
-        // check no temporary mountpoint is used
-        $mountPoints = (int)$GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint'];
-        if (!$mountPoints) {
-            $mountPoints = array_map('intval', $GLOBALS['BE_USER']->returnWebmounts());
-            $mountPoints = array_unique($mountPoints);
-        } else {
-            $mountPoints = [$mountPoints];
-        }
-        $isNumericSearchFilter = is_numeric($searchFilter) && $searchFilter > 0;
-        $searchFilterQuoted = preg_quote($searchFilter, '/');
-        $nodeId = (int)$node->getId();
-        $processedRecordIds = [];
-        foreach ($records as $record) {
-            $uid = (int)$record['t3ver_oid'] ?: $record['uid'];
-            if (in_array($uid, $this->hiddenRecords) || in_array($uid, $processedRecordIds, true)
-                || (
-                    (int)$record['pid'] === -1 && (
-                        (int)$record['t3ver_wsid'] === 0
-                        || (int)$record['t3ver_wsid'] !== (int)$GLOBALS['BE_USER']->workspace
-                    )
-                )
-            ) {
-                continue;
-            }
-            $processedRecordIds[] = $uid;
-
-            $rootline = BackendUtility::BEgetRootLine(
-                $uid,
-                '',
-                $GLOBALS['BE_USER']->workspace != 0,
-                [
-                    'hidden',
-                    'starttime',
-                    'endtime',
-                ]
-            );
-            $rootline = array_reverse($rootline);
-            if (!in_array(0, $mountPoints, true)) {
-                $isInsideMountPoints = false;
-                foreach ($rootline as $rootlineElement) {
-                    if (in_array((int)$rootlineElement['uid'], $mountPoints, true)) {
-                        $isInsideMountPoints = true;
-                        break;
-                    }
-                }
-                if (!$isInsideMountPoints) {
-                    continue;
-                }
-            }
-            $reference = $nodeCollection;
-            $inFilteredRootline = false;
-            $amountOfRootlineElements = count($rootline);
-            // render the root line elements up to the search result
-            for ($i = 0; $i < $amountOfRootlineElements; ++$i) {
-                $rootlineElement = $rootline[$i];
-                $rootlineElement['uid'] = (int)$rootlineElement['uid'];
-                $isInWebMount = (int)$GLOBALS['BE_USER']->isInWebMount($rootlineElement['uid']);
-                if (!$isInWebMount
-                    || ($rootlineElement['uid'] === (int)$mountPoints[0]
-                        && $rootlineElement['uid'] !== $isInWebMount)
-                ) {
-                    continue;
-                }
-                if ((int)$rootlineElement['pid'] === $nodeId
-                    || $rootlineElement['uid'] === $nodeId
-                    || ($rootlineElement['uid'] === $isInWebMount
-                        && in_array($rootlineElement['uid'], $mountPoints, true))
-                ) {
-                    $inFilteredRootline = true;
-                }
-                if (!$inFilteredRootline || $rootlineElement['uid'] === $mountPoint) {
-                    continue;
-                }
-                $ident = (int)$rootlineElement['sorting'] . (int)$rootlineElement['uid'];
-                if ($reference && $reference->offsetExists($ident)) {
-                    /** @var $refNode \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
-                    $refNode = $reference->offsetGet($ident);
-                    $refNode->setExpanded(true);
-                    $refNode->setLeaf(false);
-                    $reference = $refNode->getChildNodes();
-                    if ($reference == null) {
-                        $reference = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection::class);
-                        $refNode->setChildNodes($reference);
-                    }
-                } else {
-                    $refNode = Commands::getNewNode($rootlineElement, $mountPoint);
-                    $replacement = '<span class="typo3-pagetree-filteringTree-highlight">$1</span>';
-                    if ($isNumericSearchFilter && (int)$rootlineElement['uid'] === (int)$searchFilter) {
-                        $text = str_replace('$1', $refNode->getText(), $replacement);
-                    } else {
-                        $text = preg_replace('/(' . $searchFilterQuoted . ')/iu', $replacement, $refNode->getText());
-                    }
-                    $refNode->setText($text, $refNode->getTextSourceField(), $refNode->getPrefix(), $refNode->getSuffix());
-                    /** @var $childCollection \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection */
-                    $childCollection = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection::class);
-                    if ($i + 1 >= $amountOfRootlineElements) {
-                        $childNodes = $this->getNodes($refNode, $mountPoint);
-                        foreach ($childNodes as $childNode) {
-                            /** @var $childNode \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
-                            $childRecord = $childNode->getRecord();
-                            $childIdent = (int)$childRecord['sorting'] . (int)$childRecord['uid'];
-                            $childCollection->offsetSet($childIdent, $childNode);
-                        }
-                        $refNode->setChildNodes($childNodes);
-                    }
-                    $refNode->setChildNodes($childCollection);
-                    $reference->offsetSet($ident, $refNode);
-                    $reference->ksort();
-                    $reference = $childCollection;
-                }
-            }
-        }
-        foreach ($this->processCollectionHookObjects as $hookObject) {
-            /** @var $hookObject \TYPO3\CMS\Backend\Tree\Pagetree\CollectionProcessorInterface */
-            $hookObject->postProcessFilteredNodes($node, $searchFilter, $mountPoint, $nodeCollection);
-        }
-        return $nodeCollection;
-    }
-
-    /**
-     * Returns the page tree mounts for the current user
-     *
-     * Note: If you add the search filter parameter, the nodes will be filtered by this string.
-     *
-     * @param string $searchFilter
-     * @return \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection
-     */
-    public function getTreeMounts($searchFilter = '')
-    {
-        /** @var $nodeCollection \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection */
-        $nodeCollection = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection::class);
-        $isTemporaryMountPoint = false;
-        $rootNodeIsVirtual = false;
-        $mountPoints = (int)$GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint'];
-        if (!$mountPoints) {
-            $mountPoints = array_map('intval', $GLOBALS['BE_USER']->returnWebmounts());
-            $mountPoints = array_unique($mountPoints);
-            if (!in_array(0, $mountPoints, true)) {
-                $rootNodeIsVirtual = true;
-                // use a virtual root
-                // the real mountpoints will be fetched in getNodes() then
-                // since those will be the "subpages" of the virtual root
-                $mountPoints = [0];
-            }
-        } else {
-            $isTemporaryMountPoint = true;
-            $mountPoints = [$mountPoints];
-        }
-        if (empty($mountPoints)) {
-            return $nodeCollection;
-        }
-
-        foreach ($mountPoints as $mountPoint) {
-            if ($mountPoint === 0) {
-                $record = [
-                    'uid' => 0,
-                    'title' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] ?: 'TYPO3'
-                ];
-                $subNode = Commands::getNewNode($record);
-                $subNode->setLabelIsEditable(false);
-                if ($rootNodeIsVirtual) {
-                    $subNode->setType('virtual_root');
-                    $subNode->setIsDropTarget(false);
-                } else {
-                    $subNode->setType('pages_root');
-                    $subNode->setIsDropTarget(true);
-                }
-            } else {
-                if (in_array($mountPoint, $this->hiddenRecords)) {
-                    continue;
-                }
-                $record = BackendUtility::getRecordWSOL('pages', $mountPoint);
-                if (!$record) {
-                    continue;
-                }
-                $subNode = Commands::getNewNode($record, $mountPoint);
-                if ($this->showRootlineAboveMounts && !$isTemporaryMountPoint) {
-                    $rootline = Commands::getMountPointPath($record['uid']);
-                    $subNode->setReadableRootline($rootline);
-                }
-            }
-            if (count($mountPoints) <= 1) {
-                $subNode->setExpanded(true);
-                $subNode->setCls('typo3-pagetree-node-notExpandable');
-            }
-            $subNode->setIsMountPoint(true);
-            $subNode->setDraggable(false);
-            if ($searchFilter === '') {
-                $childNodes = $this->getNodes($subNode, $mountPoint);
-            } else {
-                $childNodes = $this->getFilteredNodes($subNode, $searchFilter, $mountPoint);
-                $subNode->setExpanded(true);
-            }
-            $subNode->setChildNodes($childNodes);
-            $nodeCollection->append($subNode);
-        }
-        foreach ($this->processCollectionHookObjects as $hookObject) {
-            /** @var $hookObject \TYPO3\CMS\Backend\Tree\Pagetree\CollectionProcessorInterface */
-            $hookObject->postProcessGetTreeMounts($searchFilter, $nodeCollection);
-        }
-        return $nodeCollection;
-    }
-
-    /**
-     * Sets the Doctrine where clause for fetching pages
-     *
-     * @param QueryBuilder $queryBuilder
-     * @param string $searchFilter
-     * @return QueryBuilder
-     */
-    protected function setWhereClause(QueryBuilder $queryBuilder, $searchFilter = ''): QueryBuilder
-    {
-        $expressionBuilder = $queryBuilder->expr();
-        $queryBuilder->where(
-            QueryHelper::stripLogicalOperatorPrefix($GLOBALS['BE_USER']->getPagePermsClause(1)),
-            // Only show records in default language
-            $expressionBuilder->eq('sys_language_uid', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT))
-        );
-
-        if ($searchFilter !== '') {
-            $searchParts = $expressionBuilder->orX();
-            if (is_numeric($searchFilter) && $searchFilter > 0) {
-                $searchParts->add(
-                    $expressionBuilder->eq('uid', $queryBuilder->createNamedParameter($searchFilter, \PDO::PARAM_INT))
-                );
-            }
-            $searchFilter = '%' . $queryBuilder->escapeLikeWildcards($searchFilter) . '%';
-            $useNavTitle = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showNavTitle');
-
-            if ($useNavTitle) {
-                $searchWhereAlias = $expressionBuilder->orX(
-                    $expressionBuilder->like(
-                        'nav_title',
-                        $queryBuilder->createNamedParameter($searchFilter, \PDO::PARAM_STR)
-                    ),
-                    $expressionBuilder->andX(
-                        $expressionBuilder->eq(
-                            'nav_title',
-                            $queryBuilder->createNamedParameter('', \PDO::PARAM_STR)
-                        ),
-                        $expressionBuilder->like(
-                            'title',
-                            $queryBuilder->createNamedParameter($searchFilter, \PDO::PARAM_STR)
-                        )
-                    )
-                );
-                $searchParts->add($searchWhereAlias);
-            } else {
-                $searchParts->add(
-                    $expressionBuilder->like(
-                        'title',
-                        $queryBuilder->createNamedParameter($searchFilter, \PDO::PARAM_STR)
-                    )
-                );
-            }
-
-            // Also search for the alias
-            $searchParts->add(
-                $expressionBuilder->like(
-                    'alias',
-                    $queryBuilder->createNamedParameter($searchFilter, \PDO::PARAM_STR)
-                )
-            );
-            $queryBuilder->andWhere($searchParts);
-        }
-        return $queryBuilder;
-    }
-
-    /**
-     * Returns all sub-pages of a given ID
-     *
-     * @param int $id
-     * @return array
-     */
-    protected function getSubpages(int $id): array
-    {
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
-        $queryBuilder->getRestrictions()
-            ->removeAll()
-            ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
-            ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
-        $result = [];
-        $queryBuilder->select('*')
-            ->from('pages')
-            ->where(
-                QueryHelper::stripLogicalOperatorPrefix($GLOBALS['BE_USER']->getPagePermsClause(1)),
-                // Only show records in default language
-                $queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT))
-            )
-            ->orderBy('sorting');
-        if ((int)$id >= 0) {
-            $queryBuilder->andWhere(
-                $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($id, \PDO::PARAM_INT))
-            );
-        }
-        $queryResult = $queryBuilder->execute();
-        while ($row = $queryResult->fetch()) {
-            BackendUtility::workspaceOL('pages', $row, -99, true);
-            if ($row) {
-                $result[] = $row;
-            }
-        }
-        return $result;
-    }
-
-    /**
-     * Returns all pages with a query.
-     *
-     * @param string $searchFilter
-     * @return array
-     */
-    protected function getPagesByQuery(string $searchFilter = ''): array
-    {
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
-        $queryBuilder->getRestrictions()
-            ->removeAll()
-            ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
-            ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
-        $result = [];
-        $queryBuilder = $this->setWhereClause($queryBuilder, $searchFilter);
-        $queryResult = $queryBuilder->select('*')
-            ->from('pages')
-            ->orderBy('sorting')
-            ->execute();
-        while ($row = $queryResult->fetch()) {
-            BackendUtility::workspaceOL('pages', $row, -99, true);
-            if ($row) {
-                $result[] = $row;
-            }
-        }
-        return $result;
-    }
-
-    /**
-     * Returns true if the node has children.
-     *
-     * @param int $id
-     * @return bool
-     */
-    protected function hasNodeSubPages(int $id): bool
-    {
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
-        $queryBuilder->getRestrictions()
-            ->removeAll()
-            ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
-            ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
-        $queryBuilder->count('uid')
-            ->from('pages')
-            ->where(
-                QueryHelper::stripLogicalOperatorPrefix($GLOBALS['BE_USER']->getPagePermsClause(1)),
-                // Only show records in default language
-                $queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT))
-            );
-        if ((int)$id >= 0) {
-            $queryBuilder->andWhere(
-                $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($id, \PDO::PARAM_INT))
-            );
-        }
-        $count = $queryBuilder->execute()
-            ->fetchColumn(0);
-        return (bool)$count;
-    }
-}
diff --git a/typo3/sysext/backend/Classes/Tree/Pagetree/ExtdirectTreeDataProvider.php b/typo3/sysext/backend/Classes/Tree/Pagetree/ExtdirectTreeDataProvider.php
deleted file mode 100644 (file)
index 6455f2e..0000000
+++ /dev/null
@@ -1,110 +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!
- */
-
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Data Provider of the Page Tree
- */
-class ExtdirectTreeDataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTree
-{
-    /**
-     * Data Provider
-     *
-     * @var \TYPO3\CMS\Backend\Tree\Pagetree\DataProvider
-     */
-    protected $dataProvider = null;
-
-    /**
-     * @var IconFactory
-     */
-    protected $iconFactory;
-
-    /**
-     * Constructor
-     */
-    public function __construct()
-    {
-        $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-    }
-
-    /**
-     * Sets the data provider
-     */
-    protected function initDataProvider()
-    {
-        /** @var $dataProvider \TYPO3\CMS\Backend\Tree\Pagetree\DataProvider */
-        $dataProvider = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\DataProvider::class);
-        $this->setDataProvider($dataProvider);
-    }
-
-    /**
-     * Returns the root node of the tree
-     *
-     * @return array
-     */
-    public function getRoot()
-    {
-        $this->initDataProvider();
-        $node = $this->dataProvider->getRoot();
-        return $node->toArray();
-    }
-
-    /**
-     * Fetches the next tree level
-     *
-     * @param int $nodeId
-     * @param \stdClass $nodeData
-     * @return array
-     */
-    public function getNextTreeLevel($nodeId, $nodeData)
-    {
-        $this->initDataProvider();
-        /** @var $node \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
-        $node = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode::class, (array)$nodeData);
-        if ($nodeId === 'root') {
-            $nodeCollection = $this->dataProvider->getTreeMounts();
-        } else {
-            $nodeCollection = $this->dataProvider->getNodes($node, $node->getMountPoint());
-        }
-        return $nodeCollection->toArray();
-    }
-
-    /**
-     * Returns a tree that only contains elements that match the given search string
-     *
-     * @param int $nodeId
-     * @param \stdClass $nodeData
-     * @param string $searchFilter
-     * @return array
-     */
-    public function getFilteredTree($nodeId, $nodeData, $searchFilter)
-    {
-        if (strval($searchFilter) === '') {
-            return [];
-        }
-        /** @var $node \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
-        $node = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode::class, (array)$nodeData);
-        $this->initDataProvider();
-        if ($nodeId === 'root') {
-            $nodeCollection = $this->dataProvider->getTreeMounts($searchFilter);
-        } else {
-            $nodeCollection = $this->dataProvider->getFilteredNodes($node, $searchFilter, $node->getMountPoint());
-        }
-        return $nodeCollection->toArray();
-    }
-}
diff --git a/typo3/sysext/backend/Classes/Tree/Pagetree/PagetreeNode.php b/typo3/sysext/backend/Classes/Tree/Pagetree/PagetreeNode.php
deleted file mode 100644 (file)
index 71abfbe..0000000
+++ /dev/null
@@ -1,446 +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!
- */
-
- use TYPO3\CMS\Core\Versioning\VersionState;
-
- /**
- * Node designated for the page tree
- */
-class PagetreeNode extends \TYPO3\CMS\Backend\Tree\ExtDirectNode
-{
-    /**
-     * Cached access rights to save some performance
-     *
-     * @var array
-     */
-    protected $cachedAccessRights = [];
-
-    /**
-     * Workspace Overlay Id
-     *
-     * @var int
-     */
-    protected $workspaceId = 0;
-
-    /**
-     * Mount Point Id
-     *
-     * @var int
-     */
-    protected $mountPoint = 0;
-
-    /**
-     * Readable Rootline
-     *
-     * @var string
-     */
-    protected $readableRootline = '';
-
-    /**
-     * Indicator if the node is a mount point
-     *
-     * @var bool
-     */
-    protected $isMountPoint = false;
-
-    /**
-     * Indicator if the page tree should stop here
-     *
-     * @var bool
-     */
-    protected $stopPageTree = false;
-
-    /**
-     * Background color for the node
-     *
-     * @var string
-     */
-    protected $backgroundColor = '';
-
-    /**
-     * Sets the background color
-     *
-     * @param string $backgroundColor
-     */
-    public function setBackgroundColor($backgroundColor)
-    {
-        $this->backgroundColor = $backgroundColor;
-    }
-
-    /**
-     * Returns the background color
-     *
-     * @return string
-     */
-    public function getBackgroundColor()
-    {
-        return $this->backgroundColor;
-    }
-
-    /**
-     * Set's the original id of the element
-     *
-     * @param int $workspaceId
-     */
-    public function setWorkspaceId($workspaceId)
-    {
-        $this->workspaceId = (int)$workspaceId;
-    }
-
-    /**
-     * Returns the original id of the element
-     *
-     * @return int
-     */
-    public function getWorkspaceId()
-    {
-        return $this->workspaceId;
-    }
-
-    /**
-     * Sets if the pagetree should stop here
-     *
-     * @param bool $stopPageTree
-     */
-    public function setStopPageTree($stopPageTree)
-    {
-        $this->stopPageTree = (bool)$stopPageTree;
-    }
-
-    /**
-     * Returns if the pagetree should stop here
-     *
-     * @return int
-     */
-    public function getStopPageTree()
-    {
-        return $this->stopPageTree;
-    }
-
-    /**
-     * Sets the mount point id
-     *
-     * @param int $mountPoint
-     */
-    public function setMountPoint($mountPoint)
-    {
-        $this->mountPoint = (int)$mountPoint;
-    }
-
-    /**
-     * Returns the mount point id
-     *
-     * @return int
-     */
-    public function getMountPoint()
-    {
-        return $this->mountPoint;
-    }
-
-    /**
-     * Sets the indicator if the node is a mount point
-     *
-     * @param bool $isMountPoint
-     */
-    public function setIsMountPoint($isMountPoint)
-    {
-        $this->isMountPoint = $isMountPoint == true;
-    }
-
-    /**
-     * Returns TRUE if the node is a mount point
-     *
-     * @return bool
-     */
-    public function isMountPoint()
-    {
-        return $this->isMountPoint;
-    }
-
-    /**
-     * Sets the readable rootline
-     *
-     * @param string $rootline
-     */
-    public function setReadableRootline($rootline)
-    {
-        $this->readableRootline = $rootline;
-    }
-
-    /**
-     * Returns the readable rootline
-     *
-     * @return string
-     */
-    public function getReadableRootline()
-    {
-        return $this->readableRootline;
-    }
-
-    /**
-     * Checks if the user may create pages below the given page
-     *
-     * @return bool
-     */
-    protected function canCreate()
-    {
-        if (!isset($this->cachedAccessRights['create'])) {
-            $this->cachedAccessRights['create'] = $GLOBALS['BE_USER']->doesUserHaveAccess($this->record, 8);
-        }
-        return $this->cachedAccessRights['create'];
-    }
-
-    /**
-     * Checks if the user has editing rights
-     *
-     * @return bool
-     */
-    protected function canEdit()
-    {
-        if (!isset($this->cachedAccessRights['edit'])) {
-            $this->cachedAccessRights['edit'] =
-                $GLOBALS['BE_USER']->isAdmin()
-                || (
-                    (int)$this->record['editlock'] === 0
-                    && $GLOBALS['BE_USER']->doesUserHaveAccess($this->record, 2)
-                );
-        }
-        return $this->cachedAccessRights['edit'];
-    }
-
-    /**
-     * Checks if the user has the right to delete the page
-     *
-     * @return bool
-     */
-    protected function canRemove()
-    {
-        if (!isset($this->cachedAccessRights['remove'])) {
-            $this->cachedAccessRights['remove'] =
-                $GLOBALS['BE_USER']->isAdmin()
-                || (
-                    (int)$this->record['editlock'] === 0
-                    && $GLOBALS['BE_USER']->doesUserHaveAccess($this->record, 4)
-                );
-            if (!$this->isLeafNode() && !$GLOBALS['BE_USER']->uc['recursiveDelete']) {
-                $this->cachedAccessRights['remove'] = false;
-            }
-        }
-        return $this->cachedAccessRights['remove'];
-    }
-
-    /**
-     * Checks if the page can be disabled
-     *
-     * @return bool
-     */
-    public function canBeDisabledAndEnabled()
-    {
-        return $this->canEdit() && $GLOBALS['BE_USER']->checkLanguageAccess(0);
-    }
-
-    /**
-     * Checks if the page is allowed to can be cut
-     *
-     * @return bool
-     */
-    public function canBeCut()
-    {
-        return
-            $this->canEdit()
-            && !VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
-            && $GLOBALS['BE_USER']->checkLanguageAccess(0)
-        ;
-    }
-
-    /**
-     * Checks if the page is allowed to be edited
-     *
-     * @return bool
-     */
-    public function canBeEdited()
-    {
-        return $this->canEdit() && $GLOBALS['BE_USER']->checkLanguageAccess(0);
-    }
-
-    /**
-     * Checks if the page is allowed to be copied
-     *
-     * @return bool
-     */
-    public function canBeCopied()
-    {
-        return
-            $GLOBALS['BE_USER']->doesUserHaveAccess($this->record, 1)
-            && !VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
-            && $GLOBALS['BE_USER']->checkLanguageAccess(0)
-        ;
-    }
-
-    /**
-     * Checks if there can be new pages created
-     *
-     * @return bool
-     */
-    public function canCreateNewPages()
-    {
-        return $this->canCreate() && $GLOBALS['BE_USER']->checkLanguageAccess(0);
-    }
-
-    /**
-     * Checks if the page is allowed to be removed
-     *
-     * @return bool
-     */
-    public function canBeRemoved()
-    {
-        return
-            $this->canRemove()
-            && !VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
-            && $GLOBALS['BE_USER']->checkLanguageAccess(0)
-        ;
-    }
-
-    /**
-     * Checks if something can be pasted into the node
-     *
-     * @return bool
-     */
-    public function canBePastedInto()
-    {
-        return
-            $this->canCreate()
-            && !VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
-            && $GLOBALS['BE_USER']->checkLanguageAccess(0)
-        ;
-    }
-
-    /**
-     * Checks if something can be pasted after the node
-     *
-     * @return bool
-     */
-    public function canBePastedAfter()
-    {
-        return
-            $this->canCreate()
-            && !VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
-            && $GLOBALS['BE_USER']->checkLanguageAccess(0)
-        ;
-    }
-
-    /**
-     * Checks if the page is allowed to show history
-     *
-     * @return bool
-     */
-    public function canShowHistory()
-    {
-        return $GLOBALS['BE_USER']->checkLanguageAccess(0);
-    }
-
-    /**
-     * Checks if the page is allowed to be viewed
-     *
-     * @return bool
-     */
-    public function canBeViewed()
-    {
-        return !$this->isDeleted();
-    }
-
-    /**
-     * Checks if the page is allowed to show info
-     *
-     * @return bool
-     */
-    public function canShowInfo()
-    {
-        return true;
-    }
-
-    /**
-     * Checks if the page is allowed to be a temporary mount point
-     *
-     * @return bool
-     */
-    public function canBeTemporaryMountPoint()
-    {
-        return true;
-    }
-
-    /**
-     * Determines whether this node is deleted.
-     *
-     * @return bool
-     */
-    public function isDeleted()
-    {
-        return
-            !empty($this->record['deleted'])
-            || VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
-        ;
-    }
-
-    /**
-     * Returns the calculated id representation of this node
-     *
-     * @param string $prefix Defaults to 'p'
-     * @return string
-     */
-    public function calculateNodeId($prefix = 'p')
-    {
-        return $prefix . dechex($this->getId()) . ($this->getMountPoint() ? '-' . dechex($this->getMountPoint()) : '');
-    }
-
-    /**
-     * Returns the node in an array representation that can be used for serialization
-     *
-     * @param bool $addChildNodes
-     * @return array
-     */
-    public function toArray($addChildNodes = true)
-    {
-        $arrayRepresentation = parent::toArray();
-        $arrayRepresentation['id'] = $this->calculateNodeId();
-        $arrayRepresentation['realId'] = $this->getId();
-        $arrayRepresentation['nodeData']['id'] = $this->getId();
-        $arrayRepresentation['readableRootline'] = $this->getReadableRootline();
-        $arrayRepresentation['nodeData']['readableRootline'] = $this->getReadableRootline();
-        $arrayRepresentation['nodeData']['mountPoint'] = $this->getMountPoint();
-        $arrayRepresentation['nodeData']['workspaceId'] = $this->getWorkspaceId();
-        $arrayRepresentation['nodeData']['isMountPoint'] = $this->isMountPoint();
-        $arrayRepresentation['nodeData']['backgroundColor'] = htmlspecialchars($this->getBackgroundColor());
-        $arrayRepresentation['nodeData']['stopPageTree'] = $this->getStopPageTree();
-        $arrayRepresentation['nodeData']['serializeClassName'] = static::class;
-        return $arrayRepresentation;
-    }
-
-    /**
-     * Sets data of the node by a given data array
-     *
-     * @param array $data
-     */
-    public function dataFromArray($data)
-    {
-        parent::dataFromArray($data);
-        $this->setWorkspaceId($data['workspaceId']);
-        $this->setMountPoint($data['mountPoint']);
-        $this->setReadableRootline($data['readableRootline']);
-        $this->setIsMountPoint($data['isMountPoint']);
-        $this->setBackgroundColor($data['backgroundColor']);
-    }
-}
diff --git a/typo3/sysext/backend/Classes/Tree/Pagetree/PagetreeNodeCollection.php b/typo3/sysext/backend/Classes/Tree/Pagetree/PagetreeNodeCollection.php
deleted file mode 100644 (file)
index 8a5197c..0000000
+++ /dev/null
@@ -1,33 +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!
- */
-
-/**
- * Tree Node Collection
- */
-class PagetreeNodeCollection extends \TYPO3\CMS\Backend\Tree\TreeNodeCollection
-{
-    /**
-     * Returns the collection in an array representation for e.g. serialization
-     *
-     * @return array
-     */
-    public function toArray()
-    {
-        $arrayRepresentation = parent::toArray();
-        unset($arrayRepresentation['serializeClassName']);
-        return $arrayRepresentation;
-    }
-}
diff --git a/typo3/sysext/backend/Classes/Tree/Renderer/ExtJsJsonTreeRenderer.php b/typo3/sysext/backend/Classes/Tree/Renderer/ExtJsJsonTreeRenderer.php
deleted file mode 100644 (file)
index 7ec8def..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-<?php
-namespace TYPO3\CMS\Backend\Tree\Renderer;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-use TYPO3\CMS\Backend\Tree\TreeNodeCollection;
-use TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode;
-
-/**
- * Renderer for unordered lists
- */
-class ExtJsJsonTreeRenderer extends \TYPO3\CMS\Backend\Tree\Renderer\AbstractTreeRenderer
-{
-    /**
-     * recursion level
-     *
-     * @var int
-     */
-    protected $recursionLevel = 0;
-
-    /**
-     * Renders a node recursive or just a single instance
-     *
-     * @param \TYPO3\CMS\Backend\Tree\TreeRepresentationNode $node
-     * @param bool $recursive
-     * @return array
-     */
-    public function renderNode(\TYPO3\CMS\Backend\Tree\TreeRepresentationNode $node, $recursive = true)
-    {
-        $nodeArray = [];
-        $nodeArray[] = $this->getNodeArray($node);
-        if ($recursive && $node->hasChildNodes()) {
-            $this->recursionLevel++;
-            $children = $this->renderNodeCollection($node->getChildNodes());
-            foreach ($children as $child) {
-                $nodeArray[] = $child;
-            }
-            $this->recursionLevel--;
-        }
-        return $nodeArray;
-    }
-
-    /**
-     * Get node array
-     *
-     * @param \TYPO3\CMS\Backend\Tree\TreeRepresentationNode|DatabaseTreeNode $node
-     * @return array
-     */
-    protected function getNodeArray(\TYPO3\CMS\Backend\Tree\TreeRepresentationNode $node)
-    {
-        $overlayIconName  = '';
-        if (is_object($node->getIcon())) {
-            $iconName = $node->getIcon()->getIdentifier();
-            if (is_object($node->getIcon()->getOverlayIcon())) {
-                $overlayIconName = $node->getIcon()->getOverlayIcon()->getIdentifier();
-            }
-        } else {
-            $iconName = $node->getIcon();
-        }
-        $nodeArray = [
-            'identifier' => htmlspecialchars($node->getId()),
-            // No need for htmlspecialchars() here as d3 is using 'textContent' property of the HTML DOM node
-            'name' => $node->getLabel(),
-            'icon' => $iconName,
-            'overlayIcon' => $overlayIconName,
-            'depth' => $this->recursionLevel,
-            'hasChildren' => (bool)$node->hasChildNodes(),
-            'selectable' => true,
-        ];
-        if ($node instanceof DatabaseTreeNode) {
-            $nodeArray['checked'] = (bool)$node->getSelected();
-            if (!$node->getSelectable()) {
-                $nodeArray['checked'] = false;
-                $nodeArray['selectable'] = false;
-            }
-        }
-        return $nodeArray;
-    }
-
-    /**
-     * Renders a node collection recursive or just a single instance
-     *
-     * @param \TYPO3\CMS\Backend\Tree\AbstractTree $tree
-     * @param bool $recursive
-     * @return string
-     */
-    public function renderTree(\TYPO3\CMS\Backend\Tree\AbstractTree $tree, $recursive = true)
-    {
-        $this->recursionLevel = 0;
-        $children = $this->renderNode($tree->getRoot(), $recursive);
-        return json_encode($children);
-    }
-
-    /**
-     * Renders an tree recursive or just a single instance
-     *
-     * @param TreeNodeCollection $collection
-     * @param bool $recursive
-     * @return array
-     */
-    public function renderNodeCollection(TreeNodeCollection $collection, $recursive = true)
-    {
-        $treeItems = [];
-        foreach ($collection as $node) {
-            $allNodes = $this->renderNode($node, $recursive);
-            if ($allNodes[0]) {
-                $treeItems[] = $allNodes[0];
-            }
-            $nodeCount = count($allNodes);
-            if ($nodeCount > 1) {
-                for ($i = 1; $i < $nodeCount; $i++) {
-                    $treeItems[] = $allNodes[$i];
-                }
-            }
-        }
-        return $treeItems;
-    }
-}
index 2b2b4ff..51b6c4e 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Backend\Tree\View;
  */
 
 use TYPO3\CMS\Backend\Routing\UriBuilder;
-use TYPO3\CMS\Backend\Tree\Pagetree\Commands;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Database\ConnectionPool;
@@ -397,7 +396,7 @@ abstract class AbstractTreeView
                 if ($this->ext_showPathAboveMounts) {
                     $mountPointPid = $rootRec['pid'];
                     if ($lastMountPointPid !== $mountPointPid) {
-                        $title = Commands::getMountPointPath($mountPointPid);
+                        $title = $this->getMountPointPath((int)$mountPointPid);
                         $this->tree[] = ['isMountPointPath' => true, 'title' => $title];
                     }
                     $lastMountPointPid = $mountPointPid;
@@ -1031,6 +1030,31 @@ abstract class AbstractTreeView
     }
 
     /**
+     * Returns the mount point path for a temporary mount or the given id
+     *
+     * @param int $uid
+     * @return string
+     */
+    protected function getMountPointPath(int $uid): string
+    {
+        if ($uid <= 0) {
+            return '';
+        }
+        $rootline = array_reverse(BackendUtility::BEgetRootLine($uid));
+        array_shift($rootline);
+        $path = [];
+        foreach ($rootline as $rootlineElement) {
+            $record = BackendUtility::getRecordWSOL('pages', $rootlineElement['uid'], 'title, nav_title', '', true, true);
+            $text = $record['title'];
+            if ((bool)$this->getBackendUser()->getTSConfigVal('options.pageTree.showNavTitle') && trim($record['nav_title'] ?? '') !== '') {
+                $text = $record['nav_title'];
+            }
+            $path[] = htmlspecialchars($text);
+        }
+        return '/' . implode('/', $path);
+    }
+
+    /**
      * @return LanguageService
      */
     protected function getLanguageService()
diff --git a/typo3/sysext/backend/Tests/Unit/Tree/Pagetree/DataProviderTest.php b/typo3/sysext/backend/Tests/Unit/Tree/Pagetree/DataProviderTest.php
deleted file mode 100644 (file)
index bda3651..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-namespace TYPO3\CMS\Backend\Tests\Unit\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!
- */
-
-/**
- * Test case
- * @TODO: Refactor the subject class and make it better testable, especially getNodes()
- */
-class DataProviderTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
-{
-    /**
-     * @var \TYPO3\CMS\Backend\Tree\Pagetree\DataProvider|\PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $subject = null;
-
-    protected function setUp()
-    {
-        $GLOBALS['TYPO3_CONF_VARS']['BE']['pageTree']['preloadLimit'] = 0;
-        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'] = [];
-        /** @var $backendUserMock \TYPO3\CMS\Core\Authentication\BackendUserAuthentication|\PHPUnit_Framework_MockObject_MockObject */
-        $backendUserMock = $this->createMock(\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class);
-        $GLOBALS['BE_USER'] = $backendUserMock;
-
-        $this->subject = new \TYPO3\CMS\Backend\Tree\Pagetree\DataProvider();
-    }
-
-    /**
-     * @test
-     */
-    public function getRootNodeReturnsNodeWithRootId()
-    {
-        $this->assertSame('root', $this->subject->getRoot()->getId());
-    }
-
-    /**
-     * @test
-     */
-    public function getRootNodeReturnsExpandedNode()
-    {
-        $this->assertTrue($this->subject->getRoot()->isExpanded());
-    }
-}
diff --git a/typo3/sysext/core/Classes/Tree/TableConfiguration/ArrayTreeRenderer.php b/typo3/sysext/core/Classes/Tree/TableConfiguration/ArrayTreeRenderer.php
new file mode 100644 (file)
index 0000000..bf35e3f
--- /dev/null
@@ -0,0 +1,127 @@
+<?php
+namespace TYPO3\CMS\Core\Tree\TableConfiguration;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+use TYPO3\CMS\Backend\Tree\TreeNodeCollection;
+
+/**
+ * Renders a tca tree array for ExtJS
+ */
+class ArrayTreeRenderer extends \TYPO3\CMS\Backend\Tree\Renderer\AbstractTreeRenderer
+{
+    /**
+     * recursion level
+     *
+     * @var int
+     */
+    protected $recursionLevel = 0;
+
+    /**
+     * Renders a node recursive or just a single instance
+     *
+     * @param \TYPO3\CMS\Backend\Tree\TreeRepresentationNode $node
+     * @param bool $recursive
+     * @return array
+     */
+    public function renderNode(\TYPO3\CMS\Backend\Tree\TreeRepresentationNode $node, $recursive = true)
+    {
+        $nodeArray = [];
+        $nodeArray[] = $this->getNodeArray($node);
+        if ($recursive && $node->hasChildNodes()) {
+            $this->recursionLevel++;
+            $children = $this->renderNodeCollection($node->getChildNodes());
+            foreach ($children as $child) {
+                $nodeArray[] = $child;
+            }
+            $this->recursionLevel--;
+        }
+        return $nodeArray;
+    }
+
+    /**
+     * Get node array
+     *
+     * @param \TYPO3\CMS\Backend\Tree\TreeRepresentationNode|DatabaseTreeNode $node
+     * @return array
+     */
+    protected function getNodeArray(\TYPO3\CMS\Backend\Tree\TreeRepresentationNode $node)
+    {
+        $overlayIconName  = '';
+        if (is_object($node->getIcon())) {
+            $iconName = $node->getIcon()->getIdentifier();
+            if (is_object($node->getIcon()->getOverlayIcon())) {
+                $overlayIconName = $node->getIcon()->getOverlayIcon()->getIdentifier();
+            }
+        } else {
+            $iconName = $node->getIcon();
+        }
+        $nodeArray = [
+            'identifier' => htmlspecialchars($node->getId()),
+            // No need for htmlspecialchars() here as d3 is using 'textContent' property of the HTML DOM node
+            'name' => $node->getLabel(),
+            'icon' => $iconName,
+            'overlayIcon' => $overlayIconName,
+            'depth' => $this->recursionLevel,
+            'hasChildren' => (bool)$node->hasChildNodes(),
+            'selectable' => true,
+        ];
+        if ($node instanceof DatabaseTreeNode) {
+            $nodeArray['checked'] = (bool)$node->getSelected();
+            if (!$node->getSelectable()) {
+                $nodeArray['checked'] = false;
+                $nodeArray['selectable'] = false;
+            }
+        }
+        return $nodeArray;
+    }
+
+    /**
+     * Renders a node collection recursive or just a single instance
+     *
+     * @param \TYPO3\CMS\Backend\Tree\AbstractTree $tree
+     * @param bool $recursive
+     * @return array
+     */
+    public function renderTree(\TYPO3\CMS\Backend\Tree\AbstractTree $tree, $recursive = true)
+    {
+        $this->recursionLevel = 0;
+        return $this->renderNode($tree->getRoot(), $recursive);
+    }
+
+    /**
+     * Renders an tree recursive or just a single instance
+     *
+     * @param TreeNodeCollection $collection
+     * @param bool $recursive
+     * @return array
+     */
+    public function renderNodeCollection(TreeNodeCollection $collection, $recursive = true)
+    {
+        $treeItems = [];
+        foreach ($collection as $node) {
+            $allNodes = $this->renderNode($node, $recursive);
+            if ($allNodes[0]) {
+                $treeItems[] = $allNodes[0];
+            }
+            $nodeCount = count($allNodes);
+            if ($nodeCount > 1) {
+                for ($i = 1; $i < $nodeCount; $i++) {
+                    $treeItems[] = $allNodes[$i];
+                }
+            }
+        }
+        return $treeItems;
+    }
+}
diff --git a/typo3/sysext/core/Classes/Tree/TableConfiguration/ExtJsArrayTreeRenderer.php b/typo3/sysext/core/Classes/Tree/TableConfiguration/ExtJsArrayTreeRenderer.php
deleted file mode 100644 (file)
index e7eaa35..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tree\TableConfiguration;
-
-/*
- * 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!
- */
-
-/**
- * Renders a tca tree array for ExtJS
- */
-class ExtJsArrayTreeRenderer extends \TYPO3\CMS\Backend\Tree\Renderer\ExtJsJsonTreeRenderer
-{
-    /**
-     * Renders a node collection recursive or just a single instance
-     *
-     * @param \TYPO3\CMS\Backend\Tree\AbstractTree $tree
-     * @param bool $recursive
-     * @return array
-     */
-    public function renderTree(\TYPO3\CMS\Backend\Tree\AbstractTree $tree, $recursive = true)
-    {
-        $this->recursionLevel = 0;
-        return $this->renderNode($tree->getRoot(), $recursive);
-    }
-}
index 919a20d..8a5cc42 100644 (file)
@@ -853,9 +853,6 @@ return [
         'installToolPassword' => '',
         'checkStoredRecords' => true,
         'checkStoredRecordsLoose' => true,
-        'pageTree' => [
-            'preloadLimit' => 99999999
-        ],
         'defaultUserTSconfig' => 'options.enableBookmarks=1
                        options.file_list.enableDisplayBigControlPanel=selectable
                        options.file_list.enableDisplayThumbnails=selectable
index e448597..dd469ac 100644 (file)
@@ -17,9 +17,17 @@ ExtDirect classes were removed without substitution.
 Removed classes:
 ----------------
 
+* :php:`TYPO3\CMS\Backend\Tree\ExtDirectNode`
+* :php:`TYPO3\CMS\Backend\Tree\Pagetree\Commands`
+* :php:`TYPO3\CMS\Backend\Tree\Pagetree\DataProvider`
 * :php:`TYPO3\CMS\Backend\Tree\Pagetree\ExtdirectTreeCommands`
+* :php:`TYPO3\CMS\Backend\Tree\Pagetree\ExtdirectTreeDataProvider`
+* :php:`TYPO3\CMS\Backend\Tree\Renderer\ExtJsJsonTreeRenderer`
+* :php:`TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode`
+* :php:`TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection`
 * :php:`TYPO3\CMS\Core\ExtDirect\ExtDirectApi`
 * :php:`TYPO3\CMS\Core\ExtDirect\ExtDirectRouter`
+* :php:`TYPO3\CMS\Workspaces\Hooks\PagetreeCollectionsProcessor`
 
 
 Removed methods:
@@ -35,6 +43,13 @@ Removed methods:
 * :php:`TYPO3\CMS\Core\Page\PageRenderer->enableExtJsDebug()`
 
 
+Removed interfaces:
+-------------------
+
+* :php:`TYPO3\CMS\Backend\Tree\Pagetree\CollectionProcessorInterface`
+* :php:`TYPO3\CMS\Backend\Tree\EditableNodeLabelInterface`
+* :php:`TYPO3\CMS\Backend\Tree\DraggableAndDropableNodeInterface`
+
 Impact
 ======
 
index cf0a15d..92bbf10 100644 (file)
@@ -3,5 +3,6 @@ return [
     'TYPO3\\CMS\\Lang\\LanguageService' => \TYPO3\CMS\Core\Localization\LanguageService::class,
     'TYPO3\\CMS\\ContextHelp\\Controller\\ContextHelpAjaxController' => \TYPO3\CMS\Backend\Controller\ContextHelpAjaxController::class,
     'TYPO3\\CMS\\Sv\\AbstractAuthenticationService' => \TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::class,
-    'TYPO3\\CMS\\Sv\\AuthenticationService' => \TYPO3\CMS\Core\Authentication\AuthenticationService::class
+    'TYPO3\\CMS\\Sv\\AuthenticationService' => \TYPO3\CMS\Core\Authentication\AuthenticationService::class,
+    'TYPO3\\CMS\\Core\\Tree\\TableConfiguration\\ExtJsArrayTreeRenderer' => \TYPO3\CMS\Core\Tree\TableConfiguration\ArrayTreeRenderer::class
 ];
index ed00e46..06c4d74 100644 (file)
@@ -462,6 +462,46 @@ return [
             'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
         ],
     ],
+    'TYPO3\CMS\Backend\Tree\ExtDirectNode' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
+    'TYPO3\CMS\Backend\Tree\Pagetree\Commands' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
+    'TYPO3\CMS\Backend\Tree\Pagetree\DataProvider' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
+    'TYPO3\CMS\Backend\Tree\Pagetree\ExtdirectTreeDataProvider' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
+    'TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
+    'TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
+    'TYPO3\CMS\Backend\Tree\Renderer\ExtJsJsonTreeRenderer' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
+    'TYPO3\CMS\Workspaces\Hooks\PagetreeCollectionsProcessor' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
 
     // Removed interfaces
     'TYPO3\CMS\Backend\Form\DatabaseFileIconsHookInterface' => [
@@ -469,4 +509,19 @@ return [
             'Breaking-80700-DeprecatedFunctionalityRemoved.rst',
         ],
     ],
+    'TYPO3\CMS\Backend\Tree\Pagetree\CollectionProcessorInterface' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
+    'TYPO3\CMS\Backend\Tree\EditableNodeLabelInterface' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
+    'TYPO3\CMS\Backend\Tree\DraggableAndDropableNodeInterface' => [
+        'restFiles' => [
+            'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
+        ],
+    ],
 ];
diff --git a/typo3/sysext/workspaces/Classes/Hooks/PagetreeCollectionsProcessor.php b/typo3/sysext/workspaces/Classes/Hooks/PagetreeCollectionsProcessor.php
deleted file mode 100644 (file)
index 6a51d4d..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-namespace TYPO3\CMS\Workspaces\Hooks;
-
-/*
- * 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\Utility\GeneralUtility;
-use TYPO3\CMS\Workspaces\Service\WorkspaceService;
-
-/**
- * Interface for classes which perform pre or post processing
- */
-class PagetreeCollectionsProcessor implements \TYPO3\CMS\Backend\Tree\Pagetree\CollectionProcessorInterface
-{
-    /**
-     * @var WorkspaceService
-     */
-    protected $workspaceService = null;
-
-    /**
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
-     * @param int $mountPoint
-     * @param int $level
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection $nodeCollection
-     */
-    public function postProcessGetNodes($node, $mountPoint, $level, $nodeCollection)
-    {
-        foreach ($nodeCollection as $node) {
-            /** @var $node \TYPO3\CMS\Backend\Tree\TreeNode */
-            $this->highlightVersionizedElements($node);
-        }
-    }
-
-    /**
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node
-     * @param string $searchFilter
-     * @param int $mountPoint
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection $nodeCollection
-     */
-    public function postProcessFilteredNodes($node, $searchFilter, $mountPoint, $nodeCollection)
-    {
-        foreach ($nodeCollection as $node) {
-            /** @var $node \TYPO3\CMS\Backend\Tree\TreeNode */
-            $this->highlightVersionizedElements($node);
-        }
-    }
-
-    /**
-     * @param string $searchFilter
-     * @param \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNodeCollection $nodeCollection
-     */
-    public function postProcessGetTreeMounts($searchFilter, $nodeCollection)
-    {
-        foreach ($nodeCollection as $node) {
-            /** @var $node \TYPO3\CMS\Backend\Tree\TreeNode */
-            $this->highlightVersionizedElements($node);
-        }
-    }
-
-    /**
-     * Sets the CSS Class on all pages which have versioned records
-     * in the current workspace
-     *
-     * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
-     */
-    protected function highlightVersionizedElements(\TYPO3\CMS\Backend\Tree\TreeNode $node)
-    {
-        if (!$node->getCls() && $this->getWorkspaceService()->hasPageRecordVersions($GLOBALS['BE_USER']->workspace, $node->getId())) {
-            $node->setCls('ver-versions');
-        }
-    }
-
-    /**
-     * @return WorkspaceService
-     */
-    protected function getWorkspaceService()
-    {
-        if ($this->workspaceService === null) {
-            $this->workspaceService = GeneralUtility::makeInstance(WorkspaceService::class);
-        }
-
-        return $this->workspaceService;
-    }
-}
index f1b9819..95a0a89 100644 (file)
@@ -42,8 +42,6 @@ if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations
     ];
 }
 
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'][] = \TYPO3\CMS\Workspaces\Hooks\PagetreeCollectionsProcessor::class;
-
 $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433114] = \TYPO3\CMS\Workspaces\Backend\ToolbarItems\WorkspaceSelectorToolbarItem::class;
 
 // Registers preview link icon