[TYPO3-core] RFC: Feature Request #9078: Integrate hook in page module to render preview of records with own CType

Martin Kutschker masi-no at spam-typo3.org
Fri Sep 19 09:24:38 CEST 2008


Dmitry Dulepov [typo3] schrieb:
> Hi!
> 
> Oliver Hader wrote:
>> I'm using this new hook to render the previews for individual CTypes
>> as well as for previews of the standard CEs that were extended by some
>> IRRE functionalities (nested child records with additional content).
> 
> The question is: is it necessary to use getUserObj and hard-coded names?
> Sometimes different hooks are good to have in one class. Having free
> naming for hook gives more implementation freedom. I prefer
> t3lib_div::callUserFunction instead of getUserObj and hard-coded
> function name.

A class may implement an unlimited number of interfaces, so you will
need only one class to implement all the hooks your extension needs.

There should be at most one interface for a method. So eg a pre and post
processing hook share the same interface. Which is what Olly has
implemented.

If we started to use interfaces for hooks we should stay with it. Maybe
we can even retrofit existing hooks. Of course there we wouldn't throw
an exception.

Masi


More information about the TYPO3-team-core mailing list