sabbelasichon / typo3-rector

Rector for TYPO3
MIT License
231 stars 63 forks source link

Feature: #94662 - Add placeholder for site configuration in foreign_table_where #4421

Closed simonschaufi closed 3 weeks ago

simonschaufi commented 3 weeks ago

Feature: #94662 - Add placeholder for site configuration in foreign_table_where

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.4/Feature-94662-AddPlaceholderForSiteConfigurationInForeignTableWhere.html

Feature: #94662 - Add placeholder for site configuration in foreign_table_where

See 94662

Description

The foreign_table_where setting in TCA allows some old marker-based placeholder to customize the query. The best place to define site-dependent settings is the site configuration, which now can be used within foreign_table_where.

To access a configuration value the following syntax is available:

Example:

...
'fieldConfiguration' => [
    'foreign_table_where' => ' AND ({#sys_category}.{#uid} = ###SITE:rootPageId### OR {#sys_category}.{#pid} = ###SITE:mySetting.categoryPid###) ORDER BY {#sys_category}.{#title} ASC',
],
...
Backend, FlexForm, TCA, NotScanned, ext:backend