[TYPO3-dev] parsing TSconfig in BE-module?
Philipp Gampe
philipp.gampe at typo3.org
Mon Mar 3 18:58:42 CET 2014
Hi bernd,
bernd wilke wrote:
> As I wrote: it returns just the configured TS as PHP-array but nothing
> is resolved/parsed.
>
> So long I have not found a possibility to render TS as PHP-array in a BE
> module
Please have a look at Ernesto's answer and take a look at the TS
documentation (not reference).
http://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/AppendixA/Index.html
TS is just a PHP array. Nothing is parsed or interpreted in any way.
This TS array is then passed to various functions. In frontend, this is the
tslib from the CMS extension, then main frontend rendered. In essence, it
just looks over the sorted array and passes it to various functions
(stdwrap) or invokes objects and finally merges the results.
Unfortunately, this code is not very well structured, which makes it pretty
hard to call it from outside the frontend rendering process. Usually you
have to fake various aspects of the frontend rendering process to make it
work.
You should see TS as a plain settings array (from an PHP point of view).
What you do with those settings is up to you.
Just a note, in general you do not want to use frontend objects from the
backend, because they just envelope API calls. Call the APIs directly
instead.
Best regards
--
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!
More information about the TYPO3-dev
mailing list