[TYPO3-mvc] Extbase, mapOnProperty pi_flexform settings

Claus Harup ch at typoconsult.dk
Tue May 7 12:43:42 CEST 2013


Hi all

I have configured my extension through flexforms and everything works in my
datastructure (pi_flexform in database)

<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.view</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<switchableControllerActions>
<TCEforms>
<onChange>reload</onChange>
<config>
<type>select</type>
<items type="array">
<numIndex index="1" type="array">
<numIndex
index="0">LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.showproducts</numIndex>
<numIndex index="1">Shop->list;Shop->single</numIndex>
</numIndex>
<numIndex index="2" type="array">
<numIndex
index="0">LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.showminibasket</numIndex>
<numIndex index="1">Shop->minibasket</numIndex>
</numIndex>
</items>
<minitems>0</minitems>
<maxitems>1</maxitems>
<size>1</size>
</config>
</TCEforms>
</switchableControllerActions>
<settings.products>
<TCEforms>
<label>LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.products</label>
<displayCond>FIELD:switchableControllerActions:=:Shop->list;Shop->single</displayCond>
<config>
<type>group</type>
<internal_type>db</internal_type>
<foreign_table>tx_tcshop_domain_model_product</foreign_table>
<allowed>tx_tcshop_domain_model_product</allowed>
<minitems>0</minitems>
<size>10</size>
<autoSizeMax>30</autoSizeMax>
<maxitems>9999</maxitems>
<multiple>0</multiple>
<MM>tx_tcshop_content_txtcshopproduct_product_mm</MM>
<wizards>
<suggest>
<type>suggest</type>
<default>
<searchWholePhrase>1</searchWholePhrase>
</default>
</suggest>
</wizards>
</config>
</TCEforms>
</settings.products>
<settings.categories>
<TCEforms>
<label>LLL:EXT:tc_shop/Resources/Private/Language/locallang_db.xlf:tx_tcshop_domain_model_shop.categories</label>
<displayCond>FIELD:switchableControllerActions:=:Shop->list;Shop->single</displayCond>
<config>
<type>select</type>
<form_type>user</form_type>
<userFunc>tx_tccategories_treeview->displayCategoryTree</userFunc>
<treeView>1</treeView>
<treeName>txchtreeviewexample</treeName>
<treeMaxDepth>999</treeMaxDepth>
<size>10</size>
<autoSizeMax>20</autoSizeMax>
<selectedListStyle>width:250px</selectedListStyle>
<expandFirst>1</expandFirst>
<expandAll>1</expandAll>
<minitems>0</minitems>
<maxitems>100</maxitems>
<MM>misc_tx_tccategories_categories_mm</MM>
<MM_match_fields>
<tablename>tt_content</tablename>
<ident>tx_tc_shop_categories</ident>
</MM_match_fields>
<foreign_table>pages</foreign_table>
<parentField>pid</parentField>
<deftype>top</deftype>
</config>
</TCEforms>
</settings.categories>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>

..... but how do I map the fields (products & categories) to my objects
through:

plugin.tx_tcshop{
persistence{
classes{
TYPOCONSULT\TcShop\Domain\Model\Shop{
mapping{
tableName = tt_content
recordType =
columns{
*?????????????*.mapOnProperty = categories
*?????????????*.mapOnProperty = products
}
}
}
}
}
}


-- 
Claus Harup
Teknisk ansvarlig, partner
TypoConsult A/S
Rathsacksvej 1
1862 Frederiksberg C
Danmark
Tel: -45 70207036
Direkte: -45 88276075
Web: www.typoconsult.dk
Mail: ch at typoconsult.dk


More information about the TYPO3-project-typo3v4mvc mailing list