[TYPO3-mvc] Instantiate extbase action controller inside tslib_fe hook

Sebastian Kurfürst sebastian at typo3.org
Sat Oct 31 11:09:22 CET 2009


Hi Thomas,

> Is there a better solution to achieve this, or I'm on the right way?
> How to call the frontend plugin (action controller) inside the hook,
> which then should process the generated HTML source?
I think the idea to use a post-process hook for this is totally right.
However, I think it is not useful to feed these things inside a
Controller, as in your domain, there is no Model, no View, and IMHO as
well no Controller either.
If I have to solve such situations, I use an Extbase-extension /
directory layout as well, but I'd just create a simple class
"Tx_MyExtension_HTMLPostProcessor" for example, which lies in
"Classes/HTMLPostProcessor.php" and which is just a plain PHP class, and
this one can be called using standard TYPO3 hook mechanics.

So, the quintessence: Only use MVC when it makes sense, and do not try
to force every use case into "Model", "View" and "Controller".

I hope this helps a bit,
greets from Dresden,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list