Feature #103526
closedAllow the use of public PHP constants in TypoScript and Fluid
0%
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.
<div><f:const>Vendor\MyExt\SelfConstClass::FOO</f:const></div>
(see attached code as example - the namespace must be modified)
Files
Updated by Georg Ringer 8 months ago
- Tracker changed from Bug to Feature
- TYPO3 Version deleted (
13)
Updated by Georg Ringer 5 months ago
- Status changed from New to Rejected
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
Updated by Garvin Hicking 5 months ago
Also see: https://github.com/TYPO3/Fluid/pull/874