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 or 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 solution 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 multiple layers, each time for every extension of the
extension.
[...] hat auf dem TYPO3 Flyers Blog einen Bericht über seine Eindrücke der neuen erweiterungsfähigen Controller von Lib/D… veröffentlicht. Konkret geht es darum, wie man einer Controller-Klasse weitere Methoden [...]