[TYPO3-mvc] Best pratice for single table inheritance showAction

Max Rösch autoexec.bat at gmail.com
Mon Feb 18 18:03:51 CET 2013


Hi there,

i wonder if there are any ideas / working examples / best pratice 
solutions for i.e. a showAction for objects / subclasses.

The main repository delivers objects of all kind of types, first problem 
is, how to set the link action according to the type. This could be done 
by a getter method to determine the child type and set the pageId (i.e. 
for the show action) and the arguments.

I tried to mock this quickly and got a TYPO3 exception:

  There is no entry in the $TCA array for the table 
"tx_text_domain_model_childobject". This means that the function 
enableFields() is called with an invalid table name as argument.

Ok, there is only a TCA for the main type and all children are types of 
this parent type.

So maybey I need to call the showAction of the main type, fetch the 
current child type and do a redirect to the corresponding action and page.

Disadvantages:
- Always one redirect
- RealURL config can't use controller/action for specific nice child URLs

Anyone did something similar and point me in the right direction?
Thanks


More information about the TYPO3-project-typo3v4mvc mailing list