From 572767fde224a9401b4ace3b2a4938e88a8fe503 Mon Sep 17 00:00:00 2001 From: Benno Achermann Date: Sat, 23 Mar 2024 15:02:48 +0100 Subject: [PATCH 1/2] Added library extension docu for enhanced batched tag handling (#40613) --- .../54-60/removed-backward-incompatibility.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/migrations/54-60/removed-backward-incompatibility.md b/migrations/54-60/removed-backward-incompatibility.md index 48b7862b..a19f8e6f 100644 --- a/migrations/54-60/removed-backward-incompatibility.md +++ b/migrations/54-60/removed-backward-incompatibility.md @@ -15,3 +15,17 @@ There should be an explanation of how to mitigate the removals / changes. - PR: https://github.com/joomla/joomla-cms/pull/42805 - Description: The CMS Input object `\Joomla\CMS\Input` has been deprecated since Joomla 4.3. The CMS core code has switched the code to the Framework Input object `\Joomla\Input`, which is very much a drop-in replacement. This is especially of relevance if you are using the MVC classes, which now use the framework class. Make sure that your code imports the correct class. + +### Library extension for enhanced batched tag handling + +- PR: https://github.com/joomla/joomla-cms/pull/40613 +- Description: With the new possibility to batch remove a tag, the following library classes has been extended: + +#### libraries/src/Helper/TagsHelper.php + +The function `postStoreProcess` of class `\Joomla\CMS\Helper\TagsHelper` has been extended with a new optional parameter `$remove` (default value is `false`) indicating whether the tags in parameter `$newTags` should be removed. If you set it to `true` then the parameter `$replace` is ignored. + +#### libraries/src/MVC/Model/AdminModel.php + +The function `batchTag` of class `\Joomla\CMS\MVC\Model\AdminModel` has been extended with a new optional parameter `$removeTags` (default value is `false`) indicating whether the tags in parameter `$value` have to be removed. + From 53160d435bd6603a3ee779380a7fe06eb642d51d Mon Sep 17 00:00:00 2001 From: beni71 Date: Sun, 17 Nov 2024 23:22:24 +0100 Subject: [PATCH 2/2] Added deprecation and new feature information. --- migrations/54-60/new-deprecations.md | 17 +++++++++++++++++ migrations/54-60/new-features.md | 3 +++ 2 files changed, 20 insertions(+) diff --git a/migrations/54-60/new-deprecations.md b/migrations/54-60/new-deprecations.md index 92eb2659..8d75350c 100644 --- a/migrations/54-60/new-deprecations.md +++ b/migrations/54-60/new-deprecations.md @@ -10,3 +10,20 @@ sidebar_position: 2 All the new deprecations that should be aware of and what you should now be using instead. +# Class deprecations + +Planned to be removed in Joomla! 7.0. + +### postStoreProcess function in TagsHelper + +PR: https://github.com/joomla/joomla-cms/pull/40613 +File: libraries/src/Helper/TagsHelper.php +Description: With the new possibility to batch remove a tag, the `postStoreProcess()` function of class `\Joomla\CMS\Helper\TagsHelper` has been deprecated and will be removed in 7.0. +Replacement: New `postStore()` function which has an additional optional parameter `$remove` (default value is `false`) indicating whether the tags in parameter `$newTags` should be removed. If you set it to `true` then the parameter `$replace` is ignored. + +### batchTag function in AdminModel + +PR: https://github.com/joomla/joomla-cms/pull/40613 +File: libraries/src/MVC/Model/AdminModel.php +Description: With the new possibility to batch remove a tag, the `batchTag` function of class `\Joomla\CMS\MVC\Model\AdminModel` has been deprecated and will be removed in 7.0. +Replacement: New `batchTags` function which has an additional optional parameter `$removeTags` (default value is `false`) indicating whether the tags in parameter `$value` have to be removed. diff --git a/migrations/54-60/new-features.md b/migrations/54-60/new-features.md index ea380ce9..13a08cb5 100644 --- a/migrations/54-60/new-features.md +++ b/migrations/54-60/new-features.md @@ -11,3 +11,6 @@ sidebar_position: 1 All the new features that have been added to this version. Any changes in best practice. +### Batched tag enhancement + +It is now possible to batch remove a tag. PR: https://github.com/joomla/joomla-cms/pull/40613