#103526Allow the use of public PHP constants in TypoScript and Fluid
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
A viewhelper would be helpfull, which allows the output of public php-constants in the fluid-template.
@
@
(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
-
Georg Ringer changed tracker
BugFeature TYPO3 Version1304/04/24, 07:58 -
Georg Ringer commented and changed status
NewRejected 06/10/24, 20:40 -
Garvin Hicking commented 06/11/24, 15:11
Also see: https://github.com/TYPO3/Fluid/pull/874
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
userFuncto provide access to such constants via TS!feel free to contact me via slack if you need any additional support