Project

General

Profile

Actions

Feature #103526

open

Allow the use of public PHP constants in TypoScript and Fluid

Added by Dieter Porth 29 days ago. Updated 28 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
TypoScript
Start date:
2024-04-03
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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

ConstantViewHelper.php (3.1 KB) ConstantViewHelper.php Dieter Porth, 2024-04-03 10:06
Actions #1

Updated by Georg Ringer 28 days ago

  • Tracker changed from Bug to Feature
  • TYPO3 Version deleted (13)
Actions

Also available in: Atom PDF