[TYPO3-commerce] RFC Feature: #28959: New hook in tx_commerce_pibase::makeBasketView()

Michael Knabe typo3 at mfkhh.de
Wed Aug 17 15:39:48 CEST 2011


Hi Marcus,

> Notes:
> Due to the amount of arguments, they have been bundled in a parameter
> array (inspired by t3lib_PageRenderer hooks).

I don't like the idea of putting the parameters into an array. On one
hand it hides a problem (I consider requiring so many parameters a
design problem) instead of solving it. It's not on you to fix the design
flaw here but at least you shouldn't try to hide it.
On the other hand it precludes the usage of type hinting which is
especially important if you have many parameters (the more parameters
you have the harder it is to remember the correct order).

And I am wondering you really need $basketObj to be passed by reference?
I personally would not expect a view-hook to change the basket.

By the way, please add some documentation about this hook in the
doc/hooks.html file.

Just my 2 cents,
Cheers,
Michael


More information about the TYPO3-team-commerce mailing list