Skip to content

Commit

Permalink
[TASK] Display data processor aliases more prominent (#1355)
Browse files Browse the repository at this point in the history
* Move versionadded directive for alias to top. Will be removed from main and 13.4 in a follow up.
* Mention FQN when introducing the data processor
* Restructure menu and headlines for easier readability

Releases: main, 13.4, 12.4
  • Loading branch information
linawolf authored Oct 21, 2024
1 parent a248095 commit 3ff3b4a
Show file tree
Hide file tree
Showing 15 changed files with 159 additions and 113 deletions.
19 changes: 11 additions & 8 deletions Documentation/DataProcessing/CommaSeparatedValueProcessor.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
:navigation-title: comma-separated-value
.. include:: /Includes.rst.txt
.. _CommaSeparatedValueProcessor:

============================
CommaSeparatedValueProcessor
============================
======================================
`comma-separated-value` data processor
======================================

The :php:`CommaSeparatedValueProcessor` allows to split values into a
.. versionadded:: 12.1
One can use the alias :typoscript:`comma-separated-value` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\CommaSeparatedValueProcessor`.

The :php:`\TYPO3\CMS\Frontend\DataProcessing\CommaSeparatedValueProcessor`,
alias `comma-separated-value`, allows to split values into a
two-dimensional array used for :abbr:`CSV (Comma-separated values)` files or
:sql:`tt_content` records of CType `table`.

Expand Down Expand Up @@ -134,10 +141,6 @@ We define the :typoscript:`dataProcessing` property to use the

.. include:: /CodeSnippets/DataProcessing/TypoScript/CommaSeparatedValueProcessor.rst.txt

.. versionadded:: 12.1
One can use the alias :typoscript:`comma-separated-value` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\CommaSeparatedValueProcessor`.

The Fluid template
------------------
Expand Down
5 changes: 0 additions & 5 deletions Documentation/DataProcessing/CustomDataProcessors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ data processor:
The available configuration depends on the implementation of the
specific custom data processor, of course.

.. versionadded:: 12.1
One can configure a custom alias in :file:`Configuration/Services.yaml`
and use it in TypoScript instead of the fully-qualified class name.


Example output
==============

Expand Down
21 changes: 12 additions & 9 deletions Documentation/DataProcessing/DatabaseQueryProcessor.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
:navigation-title: database-query
.. include:: /Includes.rst.txt
.. _DatabaseQueryProcessor:

======================
DatabaseQueryProcessor
======================
===============================
`database-query` data processor
===============================

The :php:`DatabaseQueryProcessor` fetches records from the database, using
.. versionadded:: 12.1
One can use the alias :typoscript:`database-query` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor`.

The :php:`\TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor`,
alias `database-query`, fetches records from the database, using
standard TypoScript :ref:`select` semantics. The result is then passed to the
:ref:`cobj-fluidtemplate` as an array.

This way a :ref:`cobj-fluidtemplate` cObject can iterate over the
array of records.

.. versionadded:: 13.2
The :php:`DatabaseQueryProcessor` can be used in combination with the
The :typoscript:`database-query` processor can be used in combination with the
:ref:`RecordTransformationProcessor` to use additional computed information.

.. _DatabaseQueryProcessor-options:
Expand Down Expand Up @@ -118,10 +125,6 @@ We define the :typoscript:`dataProcessing` property to use the

.. include:: /CodeSnippets/DataProcessing/TypoScript/DatabaseQueryProcessor.rst.txt

.. versionadded:: 12.1
One can use the alias :typoscript:`database-query` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor`.


The Fluid template
Expand Down
21 changes: 11 additions & 10 deletions Documentation/DataProcessing/FilesProcessor.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
:navigation-title: files
.. include:: /Includes.rst.txt
.. _FilesProcessor:

==============
FilesProcessor
==============
======================
`files` data processor
======================

This data processor can be used for processing file information:
.. versionadded:: 12.1
One can use the alias :typoscript:`files` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\FilesProcessor`.

This data processor :php:`\TYPO3\CMS\Frontend\DataProcessing\FilesProcessor`,
alias `files`, can be used for processing file information:

* relations to file records (:sql:`sys_file_reference`)
* fetch files records by their uids in table (:sql:`sys_file`)
Expand Down Expand Up @@ -225,12 +232,6 @@ Using the :php:`FilesProcessor` the following scenario is possible:

.. include:: /CodeSnippets/DataProcessing/TypoScript/FilesProcessor.rst.txt

.. versionadded:: 12.1
One can use the alias :typoscript:`files` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\FilesProcessor`.


The Fluid template
------------------

Expand Down
20 changes: 11 additions & 9 deletions Documentation/DataProcessing/FlexFormProcessor.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
:navigation-title: flex-form
.. include:: /Includes.rst.txt
.. _FlexFormProcessor:
.. index:: FlexForm, DataProcessing

=================
FlexFormProcessor
=================
==========================
`flex-form` data processor
==========================

.. versionadded:: 12.1
One can use the alias :typoscript:`flex-form` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor`.

TYPO3 offers :ref:`FlexForms <t3coreapi:flexforms>` which can be used to store
data within an XML structure inside a single database column. The data processor
:php:`\TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor` converts the
:php:`\TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor`,
alias `flex-form`, converts the
FlexForm data of a given field into a Fluid-readable array.

.. _FlexFormProcessor-options:
Expand Down Expand Up @@ -84,11 +91,6 @@ Example of a minimal TypoScript configuration
# Since TYPO3 v12.1 one can also use the available alias
10 = flex-form
.. versionadded:: 12.1
One can use the alias :typoscript:`flex-form` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor`.

The converted array can be accessed within the Fluid template with the
:html:`{flexFormData}` variable.

Expand Down
19 changes: 11 additions & 8 deletions Documentation/DataProcessing/GalleryProcessor.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
:navigation-title: gallery
.. include:: /Includes.rst.txt
.. _GalleryProcessor:

================
GalleryProcessor
================
========================
`gallery` data processor
========================

The :php:`GalleryProcessor` provides the logic for working with galleries and
.. versionadded:: 12.1
One can use the alias :typoscript:`gallery` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor`.

The :php:`\TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor`,
alias `gallery`, provides the logic for working with galleries and
calculates the maximum asset size. It uses the files already present in
the `processedData` array for its calculations. The :ref:`FilesProcessor` can
be used to fetch the files.
Expand Down Expand Up @@ -254,10 +261,6 @@ in the :php:`GalleryProcessor` has to be equal to the content of

.. include:: /CodeSnippets/DataProcessing/TypoScript/GalleryProcessor.rst.txt

.. versionadded:: 12.1
One can use the alias :typoscript:`gallery` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor`.

The Fluid template
------------------
Expand Down
6 changes: 3 additions & 3 deletions Documentation/DataProcessing/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
.. _cobj-fluidtemplate-properties-dataprocessing:
.. _dataProcessing:

==============
dataProcessing
==============
===============
Data processors
===============

:ref:`dataProcessing <fluidtemplate-dataProcessing>` is a property of
:ref:`cobj-fluidtemplate` and :ref:`cobj-pageview`.
Expand Down
20 changes: 11 additions & 9 deletions Documentation/DataProcessing/LanguageMenuProcessor.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
:navigation-title: language-menu
.. include:: /Includes.rst.txt
.. _LanguageMenuProcessor:

=====================
LanguageMenuProcessor
=====================
============================
language-menu data processor
============================

This menu processor generates a list of language menu items which can be
.. versionadded:: 12.1
One can use the alias :typoscript:`language-menu` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor`.

The processor :php:`\TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor`,
alias `language-menu`, generates a list of language menu items which can be
assigned to the :typoscript:`FLUIDTEMPLATE` as a variable.

.. hint::
Expand Down Expand Up @@ -97,11 +104,6 @@ Using the :php:`LanguageMenuProcessor` the following scenario is possible:

.. include:: /CodeSnippets/DataProcessing/TypoScript/LanguageMenuProcessor.rst.txt

.. versionadded:: 12.1
One can use the alias :typoscript:`language-menu` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor`.


The Fluid template
------------------
Expand Down
20 changes: 11 additions & 9 deletions Documentation/DataProcessing/MenuProcessor.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
:navigation-title: menu
.. include:: /Includes.rst.txt
.. _MenuProcessor:

=============
MenuProcessor
=============
=====================
`menu` data processor
=====================

The :php:`MenuProcessor` utilizes :ref:`HMENU <cobj-hmenu>` to generate a list
.. versionadded:: 12.1
One can use the alias :typoscript:`menu` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\MenuProcessor`.

The :php:`\TYPO3\CMS\Frontend\DataProcessing\MenuProcessor`,
alias `menu`, utilizes :ref:`HMENU <cobj-hmenu>` to generate a list
of menu items which can be assigned to :typoscript:`FLUIDTEMPLATE` as a
variable.

Expand Down Expand Up @@ -117,11 +124,6 @@ Using the :php:`MenuProcessor` the following scenario is possible:

.. include:: /CodeSnippets/DataProcessing/TypoScript/MenuProcessor.rst.txt

.. versionadded:: 12.1
One can use the alias :typoscript:`menu` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\MenuProcessor`.


The Fluid template
------------------
Expand Down
12 changes: 8 additions & 4 deletions Documentation/DataProcessing/PageContentFetchingProcessor.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
:navigation-title: page-content
.. include:: /Includes.rst.txt
.. _PageContentFetchingProcessor:

============================
PageContentFetchingProcessor
============================
=============================
`page-content` data processor
=============================

This Data Processor loads all :sql:`tt_content` records from the current
.. versionadded:: 13.2

This data processor :php:`\TYPO3\CMS\Frontend\DataProcessing\PageContentFetchingProcessor`,
alias `page-content`, loads all :sql:`tt_content` records from the current
:ref:`backend layout <t3coreapi:be-layout>` into
the template with a given identifier for each :sql:`colPos`, also respecting slideMode or
collect options based on the page layouts content columns.
Expand Down
16 changes: 6 additions & 10 deletions Documentation/DataProcessing/RecordTransformationProcessor.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
:navigation-title: record-transformation
.. include:: /Includes.rst.txt
.. _RecordTransformationProcessor:

=============================
RecordTransformationProcessor
=============================
======================================
`record-transformation` data processor
======================================

.. versionadded:: 13.2
A new TypoScript data processor for :ref:`FLUIDTEMPLATE <cobj-fluidtemplate>` and
:typoscript:`PAGEVIEW` has been added.

The :typoscript:`record-transformation` Data Processor can typically be used in
The :php:`\TYPO3\CMS\Frontend\DataProcessing\RecordTransformationProcessor`,
alias `record-transformation`, can typically be used in
conjunction with the DatabaseQuery Data Processor. The DatabaseQuery Data
Processor typically fetches records from the database, and the
:typoscript:`record-transformation` will take the result, and transforms
Expand All @@ -26,12 +28,6 @@ addressed in a unified way.
The `type` property contains the database table name and the actual type based
on the record, such `tt_content.textmedia` for Content Elements.

.. note::

The Record object is available but details are still to be finalized in
the API until TYPO3 v13 LTS. Right now only the usage in Fluid is public
API.

.. _RecordTransformationProcessor-databasequeryprocessor-example:

Example: Usage with the DatabaseQueryProcessor
Expand Down
20 changes: 10 additions & 10 deletions Documentation/DataProcessing/SiteLanguageProcessor.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
:navigation-title: site-language
.. include:: /Includes.rst.txt
.. _SiteLanguageProcessor:

=====================
SiteLanguageProcessor
=====================
==============================
`site-language` data processor
==============================

.. versionadded:: 12.0
.. versionadded:: 12.1
One can use the alias :typoscript:`site-language` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\SiteLanguageProcessor`.

The :php:`SiteLanguageProcessor` fetches language-related data from the
The :php:`\TYPO3\CMS\Frontend\DataProcessing\SiteLanguageProcessor`,
alias `site-language`, fetches language-related data from the
:ref:`site configuration<t3coreapi:sitehandling>`.

.. _SiteLanguageProcessor-options:
Expand Down Expand Up @@ -43,11 +48,6 @@ Using the :php:`SiteLanguageProcessor` the following scenario is possible:

.. include:: /CodeSnippets/DataProcessing/TypoScript/SiteLanguageProcessor.rst.txt

.. versionadded:: 12.1
One can use the alias :typoscript:`site-language` instead
of the fully-qualified class name
:php:`\TYPO3\CMS\Frontend\DataProcessing\SiteLanguageProcessor`.


The Fluid template
------------------
Expand Down
Loading

0 comments on commit 3ff3b4a

Please sign in to comment.