Commit 64204e04 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[FEATURE] Show registered toolbar items in configuration module

With #96041 the registration of toolbar items was
changed. All implementations of the corresponding
interface are now automatically registered. The
$GLOBALS configuration does no longer have
any effect. An administrator however was no
longer able to get an overview of the registered
toolbar items in the configuration module.

Therefore, this patch improves the situation
by adding a new configuration provider, which
in contrast to the GlobalVariableProvider,
already shows the final ordering.

Resolves: #96152
Related: #96041
Releases: main
Change-Id: Ieba1988e65fa777aa0c71c258c0bac9e76a10ecb

Tested-by: Jochen's avatarJochen <>
Tested-by: Benni Mack's avatarBenni Mack <>
Tested-by: core-ci's avatarcore-ci <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Jochen's avatarJochen <>
Reviewed-by: Benni Mack's avatarBenni Mack <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
parent 8832da28
.. include:: ../../Includes.txt
Feature: #96152 - Backend Toolbar items overview in configuration module
See :issue:`96152`
With :issue:`96041`, the registration of backend toolbar items had been
improved. Instead of being registered via :php:`$GLOBALS`, all implementations
of :php:`ToolbarItemsInterface` are now automatically registered, while taking
the defined :php:`index` into account.
To still allow administrators an overview of the registered toolbar items,
especially the final ordering, a corresponding list has been added to
the configuration module.
It's now possible for administrators to get an overview of all registered
toolbar items and the final ordering in the configuration module.
.. index:: Backend, ext:lowlevel
* 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!
namespace TYPO3\CMS\Lowlevel\ConfigurationModuleProvider;
use TYPO3\CMS\Backend\Toolbar\ToolbarItemsRegistry;
class ToolbarItemsProvider extends AbstractProvider
protected ToolbarItemsRegistry $toolbarItemsRegistry;
public function __construct(ToolbarItemsRegistry $toolbarItemsRegistry)
$this->toolbarItemsRegistry = $toolbarItemsRegistry;
public function getConfiguration(): array
$configuration = [];
foreach ($this->toolbarItemsRegistry->getToolbarItems() as $item) {
$configuration[get_class($item)] = [
'index' => $item->getIndex(),
'hasDropdown' => $item->hasDropDown(),
return $configuration;
......@@ -216,4 +216,13 @@ services:
- name: 'lowlevel.configuration.module.provider'
identifier: 'softReferenceParsers'
label: 'LLL:EXT:lowlevel/Resources/Private/Language/locallang.xlf:softReferenceParsers'
before: 'toolbaritems'
after: 'mfaproviders'
class: 'TYPO3\CMS\Lowlevel\ConfigurationModuleProvider\ToolbarItemsProvider'
- name: 'lowlevel.configuration.module.provider'
identifier: 'toolbaritems'
label: 'LLL:EXT:lowlevel/Resources/Private/Language/locallang.xlf:toolbarItems'
after: 'softReferenceParsers'
......@@ -45,6 +45,9 @@
<trans-unit id="softReferenceParsers" resname="softReferenceParsers">
<source>Soft Reference Parsers</source>
<trans-unit id="toolbarItems" resname="toolbarItems">
<source>Backend Toolbar Items</source>
<trans-unit id="formYamlConfiguration" resname="formYamlConfiguration">
<source>Form: YAML Configuration</source>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment