Skip to content
Snippets Groups Projects
Commit 925a9021 authored by Garvin Hicking's avatar Garvin Hicking Committed by Stefan Bürk
Browse files

[DOCS] Document `site` object usage in EXT:form symfony expressions

Currently only `siteLanguage` was documented as usable, now
also `site` is explained with the most common public getter methods
and an example.

Resolves: #99723
Releases: main, 12.4
Change-Id: I8cb6de70b481322c31bd6fa7b3319c74f8af517a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84956


Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
parent d45347cd
Branches
Tags
No related merge requests found
......@@ -210,6 +210,29 @@ For example:
:yaml:`finisherIdentifier == "EmailToSender"`.
``site`` (object)
^^^^^^^^^^^^^^^^^
You can access every public method from :php:`\TYPO3\CMS\Core\Site\Entity\Site`
to access the following important ones:
* getSettings() / The site settings array
* getDefaultLanguage() / The default language object for the current site
* getConfiguration() / The whole configuration of the current site
* getIdentifier() / The identifier for the current site
* getBase() / The base URL for the current site
* getRootPageId() / The ID of the root page of the current site
* getLanguages() / An array of available language for the current site
* getSets() / Configured sets of a site (new in TYPO3 v13+)
For example:
:yaml:`site("settings").get("myVariable") == "something"`.
:yaml:`site("rootPageId") == "42"`.
More details on the `Site` object can be found in
:ref:`Using site configuration in conditions <t3coreapi:sitehandling-inConditions>`.
``siteLanguage`` (object)
^^^^^^^^^^^^^^^^^^^^^^^^^
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment