Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Enforce shortcut title to be set by controllers
The ShortcutRepository should not deal with generating shortcut titles based on the provided arguments. This can never be reliable, especially for custom extension code. The appropriate title must be set by the calling controller since this is the place where all necessary information, to define such title, are available. Therefore, adding a new shortcut button without defining a display name is deprecated. All Core controllers are adjusted to provide the necessary title themself. Resolves: #93060 Releases: master Change-Id: Ic15fe13769dec841868977a862464f8dd3c73c42 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67096 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Benni Mack <benni@typo3.org>
- Loading branch information
Showing
17 changed files
with
318 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...tion/Changelog/master/Deprecation-93060-ShortcutTitleMustBeSetByControllers.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
=============================================================== | ||
Deprecation: #93060 - Shortcut title must be set by controllers | ||
=============================================================== | ||
|
||
See :issue:`93060` | ||
|
||
Description | ||
=========== | ||
|
||
Previously the :php:`ShortcutReporsitory` had automatically generated a | ||
shortcut title based on the given arguments. However, this generation could | ||
never be reliable, especially for custom extension code, since the repository | ||
does not know about controller specific logic. Therefore, this functionality | ||
has now being deprecated. Backend controllers which add a shortcut button to | ||
their module header are now being required to also set the desired title. | ||
|
||
|
||
Impact | ||
====== | ||
|
||
Adding a new shortcut button without defining the :php:`$displayName` raises a | ||
deprecation level log entry. | ||
|
||
|
||
Affected Installations | ||
====================== | ||
|
||
All installations using the shortcut button API without defining the | ||
:php:`$displayName` property. | ||
|
||
|
||
Migration | ||
========= | ||
|
||
Define the title with | ||
:php:`TYPO3\CMS\Backend\Template\Components\Buttons\Action\ShortcutButton->setDisplayName()`. | ||
|
||
.. index:: Backend, PHP-API, NotScanned, ext:backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.