[TYPO3-mvc] extbase: implementing something simmilar to languageOverlay

Franz Koch typo3.RemoveForMessage at elements-net.de
Wed Dec 23 13:03:44 CET 2009


Hi Jochen,

>> My plan was to completely move that data to a external table and fetch
>> the relevant description with a JOIN LEFT, so that the data is part of
>> the article itself. But does this work? What's the suggested way to do
>> this, so that I can use methods like "$article->getDescription" and
>> don't have to do something like
>> "$article->getDataHolder()->getDescription".
>
> A clean way to implement this would be to have an abstract class
> AbstractComment and some classes extending it like CatalogComment,
> FlyerComment. Inside the ArticleRepository you can implement the logic
> to fetch and build your Article.

Unfortunately that won't work, because there is no fixed set of output 
types - the editors can create new output types as they need it (it's a 
separate db-table/valueObject).

> If the building process gets more
> complicated you might want to move it into an ArticleFactroy called by
> the ArticleRepository.

I'll give that I try then - thanks.

> Unfortunately, you're not able to store the Comments in one table
> without building custom Queries, yet. But we're working on that feature
> (See posting "Single table inheritance").

As I don't need feEditing and thus also no object persistance etc. that 
shouldn't be a problem for now. Data is managed in BE using 
"traditional" ways and IRRE for now (that's at least the plan - still 
struggling with the correct db-schema together with the object structure).

>> Or would it be better to have those fields also natively in my article
>> table and do something similar like it's done with "languageOverlay" in
>> traditional Typo3? If so, how to do this? Simply inside my
>> articleRepository, or is there something else I need to do to make
>> extbase work correctly with this? For now I don't need objectPersistency
>> as no feEditing is needed.
>
> I would not recommend overlays.

I just talked to my customer and he would like to have a overlay 
feature, meaning that basic data is provided and only gets overlayed 
with data that is especially changing for the current output media. But 
I think I can also handle this in the ArticleFactory then - I'll have a 
look. Should be no big deal as long as I don't need persistence.

Thanks for your help.
-- 
kind regards,
Franz Koch

---------------------------------------------------
PayPal-Account: 'paypal _at_ elements-net _dot_ de'
---------------------------------------------------


More information about the TYPO3-project-typo3v4mvc mailing list