[TYPO3-ect] Report: Expandable controller - praxis
Elmar Hinz
elmar07 at googlemail.com
Fri Sep 7 09:47:55 CEST 2007
Hello,
yesterday I had the first opportunity to test the expandable controller
feature of lib. To remember: It's a way to register an additional
collection of action methods to an existing controller class, either from
within the same extension of from a foreign one.
My current extension has a single plugin controller class with already many,
many actions. No I needed to extend the functionality by another table and
form. Because the main controller is already very large I decided to
encapsulate the new set of actions into a separate class. First praxis test
of the expandable controller.
It didn't run out of the box and I started to debug. It turned out that
additional controller class needs to be included before calling it by the
main controller. Well, that may sound logical, but I didn't. There was no
error message, the registered controller simply was ignored. That made
debugging difficult. The smart soulution would be to autoinclude the
registered controllers in the main controller. I need to file a bug report.
I included the additional controller in ext_localconf.php. Now everything is
running well. It really seems to be a very smart solution, comparing
projects in the past, where a needed to overwrite large switch-case
constructs in different layer, each time for every extension of the
extension.
Have a nice day
Elmar
More information about the TYPO3-team-extension-coordination
mailing list