Issue Feature Rejected

#103526Allow the use of public PHP constants in TypoScript and Fluid

Dieter Porth 04/03/24, 10:11 updated 06/11/24, 15:11

Description

I try to define constants only at one place.

*Feature-wish*
I have defined a public constant in my extension. `vendor\myextension\config\SelfConst::MY_CONST` has the value 2.
I want to transfer that value into the constants of the typoscript as a default value.
The typoscript should look something like this.

lib.foo.data = getConst : vendor\myextension\config\SelfConst::MY_CONST

*Wish Additional Viewhelper*
A viewhelper would be helpfull, which allows the output of public php-constants in the fluid-template.
@
<f:const>Vendor\MyExt\SelfConstClass::FOO</f:const>

@
(see attached code as example – the namespace must be modified)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Files 1

History 3

  1. Georg Ringer changed tracker Bug Feature TYPO3 Version 13 04/04/24, 07:58

  2. Georg Ringer commented and changed status New Rejected 06/10/24, 20:40

    Hey Dieter,

    thanks for creating this issue. Even though this works for your setup and workflow, this won’t make it into the core.

    Feel free to create a custom extension which ships this viewhelper and an event like provided in #102581 or just using a userFunc to provide access to such constants via TS!

    feel free to contact me via slack if you need any additional support