Skip to content

Commit

Permalink
Use FQCN for SetRegistry/SetCollector (TYPO3-Documentation#4831)
Browse files Browse the repository at this point in the history
* [TASK] Use FQCN for SetRegistry/SetCollector

Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com>
  • Loading branch information
mbrodala and linawolf authored Oct 15, 2024
1 parent 473fdba commit 1cfdcb0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Documentation/ApiOverview/SiteHandling/SiteSets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,13 @@ already been validated, converted and, if not set, the default value is used.
SetRegistry
-----------

The `SetRegistry` retrieves the site sets found in an ordered sequence, as
The :php:`\TYPO3\CMS\Core\Site\Set\SetRegistry` retrieves the site sets found in an ordered sequence, as
defined by `dependencies` in `config.yaml`. Please preferably use the site
object to access the required data. However, if you need to query one or more
site set definitions in order as defined by dependencies, then `SetRegistry`
site set definitions in order as defined by dependencies, then
:php-short:`\TYPO3\CMS\Core\Site\Set\SetRegistry`
is the right place to go. To read all site set definitions, please
use `SetCollector`.
use :php:`TYPO3\CMS\Core\Site\Set\SetCollector`.

.. _site-sets-php-api-setregistry-getsets:

Expand Down Expand Up @@ -438,7 +439,7 @@ SetCollector
~~~~~~~~~~~~

TYPO3 comes with a new `ServiceProvider`, which goes through all extensions
with the first instantiation of the `SetCollector` and reads all site set
with the first instantiation of the :php-short:`\TYPO3\CMS\Core\Site\Set\SetCollector` and reads all site set
definitions found.

.. code-block:: php
Expand All @@ -450,8 +451,8 @@ definitions found.
However, this is not the official way to access the site set definitions and
their dependencies. Please access the configuration via the site object.
Alternatively, you can also use the `SetRegistry`, as only this manages the
Alternatively, you can also use the :php-short:`\TYPO3\CMS\Core\Site\Set\SetRegistry`, as only this manages the
site sets in the order declared by the dependency specification.

Only use the `SetCollector` if you need to read all site set definitions.
Only use the :php-short:`\TYPO3\CMS\Core\Site\Set\SetCollector` if you need to read all site set definitions.
Dependencies are not taken into account here.

0 comments on commit 1cfdcb0

Please sign in to comment.