[TYPO3-mvc] BE module controller in separate directory

Claus Due claus at wildside.dk
Fri Nov 23 10:52:48 CET 2012


Hi Kay, Stefano,

> should work, if you keep an eye on the naming convention:
> 
> Tx_extname_Controller_Be_Controller1Controller
> 
> Should be in extname/Classes/Controller/Be/Controller1Controller.php

Woldn't that be nice? :)

Unfortunately that will not work. As Stefano has found out, it is simply impossible to place controllers in other folders, regardless of the naming convention. Extbase does not detect the Controller if it is in a subfolder - the only exception to this rule is CommandControllers (which are defined as a raw classname, bypassing possible detection issues).

Extbase will always look for the class in the EXT:myext/Classes/Controller folder and you can only affect the controller name when registering modules.

You cannot register the module with a controller name like "Be_MyController" as Extbase fails on this, although it would create the correct classname, always.

Using "Be/MyController" just results in an invalid class name.

And that makes us run out of options.

I have not yet confirmed this, but I would assume that on 6.0 the name "Be\\MyController" would also result in an error from TYPO3.

It's a terribly sad situation, I agree. But it does not look like it can (read: should) be helped, judging from the Extbase/TYPO3 internals.

Cheers,
Claus


More information about the TYPO3-project-typo3v4mvc mailing list