[TYPO3-mvc] How to assign target pid for Tx_Extbase_Persistence_Repository::add
Jochen Rau
jochen.rau at typoplanet.de
Thu Jun 18 11:37:16 CEST 2009
Hi Steffen.
Steffen Kamper wrote:
>> I don't think we should make the whole multi purpose Swiss Army Knife
>> "cObj" available in the context of the extension (may it be the
>> controller or the view). But we should extract the needed information
>> (like the current page ID) and assign it to the context.
>
> why? The object exists anyway in FE context and filled with
> informations, it doesn't costs anything.
Well, in my opinion it should not be a matter of "costs" but a matter of
a clean architecture. Let's say we want to have more or other
information about the context of an extension available inside the
extbase extension. Then you can extend cObj (ouch! ;-) ) or implement a
class holding the information (preferred solution).
> If you assign some vars of it to eb object, then next request will be:
> can we assign this value too ...
Ok, that's no problem.
> The most important data is $this->cObj[data] which presents the current
> record.
Right. But there is a lot of information that is not needed
($this->cObj[data][spaceBefore] ;-). And how do you access the
information? I would prefer having $extensionContext->getCurrentPageId()
over $this->cObj[data][pid].
> I see your concerns that it's a mixture of old and new, as cObj also
> have all this functions. But if you come to any limit you'll be able to
> continue.
I is not the mixture of old and new. It is the lack of a clean way to
access the data and invoke the methods of cObj.
Regards
Jochen
More information about the TYPO3-project-typo3v4mvc
mailing list