Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Tag and alias for data processors #2554

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Classes/DataProcessing/AddNewsToMenuProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* Add the current news record to any menu, e.g. breadcrumb
*
* 20 = GeorgRinger\News\DataProcessing\AddNewsToMenuProcessor
* 20 = add-news-to-menu
* 20.menus = breadcrumbMenu,specialMenu
*/
class AddNewsToMenuProcessor implements DataProcessorInterface
Expand Down
2 changes: 1 addition & 1 deletion Classes/DataProcessing/DisableLanguageMenuProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Disable language item on a detail page if the news is not translated
*
* 20 = GeorgRinger\News\DataProcessing\DisableLanguageMenuProcessor
* 20 = disable-language-menu
* 20.if.isTrue.data = GP:tx_news_pi1|news
* 20.menus = languageMenu
*/
Expand Down
8 changes: 8 additions & 0 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ services:
GeorgRinger\News\Backend\RecordList\NewsDatabaseRecordList:
public: true

GeorgRinger\News\DataProcessing\AddNewsToMenuProcessor:
tags:
- { name: 'data.processor', identifier: 'add-news-to-menu' }

GeorgRinger\News\DataProcessing\DisableLanguageMenuProcessor:
tags:
- { name: 'data.processor', identifier: 'disable-language-menu' }

GeorgRinger\News\Command\ProxyClassRebuildCommand:
tags:
- name: 'console.command'
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Tutorials/BestPractice/BreadcrumbMenu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ here that your main :typoscript:`FLUIDTEMPLATE` can be found in
# [...] template settings
dataProcessing {
# [...] Other data processors
50 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
50 = menu
50 {
as = breadcrumbMenu
special = rootline
}
60 = GeorgRinger\News\DataProcessing\AddNewsToMenuProcessor
60 = add-news-to-menu
60.menus = breadcrumbMenu
}
}
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Tutorials/BestPractice/Seo/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,13 @@ If no translation exists, the property `available` is set to `false` - just as i

.. code-block:: typoscript

10 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
10 = language-menu
10 {
as = languageMenu
addQueryString = 1
}

11 = GeorgRinger\News\DataProcessing\DisableLanguageMenuProcessor
11 = disable-language-menu
# comma separated list of language menu names
11.menus = languageMenu

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Usage

.. code-block:: typoscript

10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
10 = menu
10 {
as = breadcrumbMenu
special = rootline
# [...] further configuration
}
20 = GeorgRinger\News\DataProcessing\AddNewsToMenuProcessor
20 = add-news-to-menu
20.menus = breadcrumbMenu,specialMenu

The property :typoscript:`menus` is a comma-separated list of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Usage

.. code-block:: typoscript

10 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
10 = language-menu
10 {
as = languageMenu
addQueryString = 1
}

11 = GeorgRinger\News\DataProcessing\DisableLanguageMenuProcessor
11 = disable-language-menu
11 {
if.isTrue.data = GP:tx_news_pi1|news
menus = languageMenu
Expand Down
Loading