Feature #3293

support for legacy TypoScript (with . at end)

Added by Sebastian Kurfuerst over 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2009-05-14
Due date:
% Done:

100%

Estimated time:
Has patch:

Description

I HATE IT!!! I just entered 20 lines, but now I will just solve the bug...


Files

fluid_3293.patch (4.26 KB) fluid_3293.patch adds utility class and simple testcase Christian Müller, 2009-06-08 17:50
#1

Updated by Sebastian Kurfuerst over 12 years ago

  • Target version changed from 1.0.0 alpha 1 to 1.0
  • Branch set to v4
#2

Updated by Sebastian Kurfuerst over 12 years ago

Problem:
All TypoScript settings are made available under $this->settings inside the Controller, and as well as {settings} inside the template. To be more close to FLOW3 and because the "." (dot) is the separator in Object Accessors, we needed to strip the trailing "." in TypoScript configuration away.
Thus, when one writes the TypoScript:
10 = TEXT
10.value = Hello
then, in classical TYPO3 v4, this gets converted to the following array:
array(
'10' => 'TEXT'
'10.' => array(
'value' => 'Hallo'
)
)
However, Extbase converts it to the following (because of the above reasons)
array(
'10' => array(
'value' => 'Hallo',
'_typoscriptNodeValue' => 'TEXT'
)
So, what happens is that the value of the actual TypoScript node is pushed down into its substructure.
This works really well, and solves most cases, but imagine the following case:
Inside your ViewHelper, you expect a configuration for a cObject which you'll render using the classical tslib_cObj. Thus, you'll need the "classical" TYPO3 v4 syntax (with trailing dot), but Extbase only provides you the 2nd syntax with _typoscriptNodeValue.

Job description:
Write a helper method you can call inside your custom ViewHelper which converts the "Extbase" TypoScript to "classical" TypoScript by re-introducing the "." where needed and remove the _typoscriptNodeValue.
Test it with unit tests.
I propose that the class should be called Tx_Extbase_Utility_TypoScript.

#3

Updated by Sebastian Kurfuerst over 12 years ago

  • Status changed from New to Accepted

Christian Müller takes over this job!

#4

Updated by Christian Müller over 12 years ago

Here we go! CLA is on the way...

#5

Updated by Sebastian Kurfuerst over 12 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

committed. Thanks and sorry for the long delay!

Greets,
Sebastian

#6

Updated by Robert Lemke over 12 years ago

  • Target version changed from 1.0 to 1.0.0 alpha 3

Also available in: Atom PDF