[TYPO3-mvc] Extbase, mapOnProperty pi_flexform settings

Gianluca Strafella gianluca.strafella at webformat.com
Fri May 10 09:16:48 CEST 2013


Hi,
I have not yet encountered your case, but in the paragraph "TypoScript 
Configuration" there is a reference to section "Using external data 
sources" and "map class hierarchies", that may be useful.

Regards,
Gianluca

Il 08/05/2013 12:41, Claus Harup ha scritto:
> Hi Gianluca
>
> The link has nothing on flexforms in the documentation??
>
> Perhabs you can point to an example where flexforms is used in
> mapOnProperty like:
>
> plugin.tx_tcshop{
> persistence{
> classes{
> TYPOCONSULT\TcShop\Domain\Model\Shop{
> mapping{
> tableName = tt_content
> recordType =
> columns{
> *?????????????*.mapOnProperty = categories
> *?????????????*.mapOnProperty = products
> }
> }
> }
> }
> }
> }
>
>
> 2013/5/8 Gianluca Strafella <gianluca.strafella at webformat.com>
>
>> 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<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 <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)
>>
>>
>> ______________________________**_________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
>> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>>
>
>
>

-- 
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