[TYPO3-mvc] Extbase, mapOnProperty pi_flexform settings

Gianluca Strafella gianluca.strafella at webformat.com
Wed May 8 09:03:06 CEST 2013


Hi,
if you have followed the Extbase "Convention over Configuration", the 
framework configures all correctly. Otherwise you have to map tt_content 
columns in TypoScript configuration. You can see 
http://docs.typo3.org/typo3cms/ExtbaseFluidBook/b-ExtbaseReference/Index.html 
for details.

Regards,
Gianluca

Il 07/05/2013 12:43, Claus Harup ha scritto:
> 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
> }
> }
> }
> }
> }
> }
>
>

-- 
Gianluca Strafella

Software Developer
gianluca.strafella at webformat.com
Tel.   +39-0427-926.389

WEBFORMAT srl – www.webformat.com
Via S. Francesco d'Assisi, 6 – 20122 MILANO
Corte Europa, 12 - 33097 SPILIMBERGO (PN)



More information about the TYPO3-project-typo3v4mvc mailing list