How set userFunc “parameters” in TYPO3 flexform

☆樱花仙子☆ 提交于 2020-01-25 08:11:25

问题


I have config for google map in my TCA

    'configuration_map' => array(
        'exclude' => 0,
        'label' => 'Map',
        'config' => array(
            'type' => 'user',
            'userFunc' => 'Vendor\\Extension\\Utility\\LocationUtility->render',
            'parameters' => array(
                'lng' => 'lng',
                'lat' => 'lat',
                'address' => 'address',
            ),
        ),
    ),  

I need same config in flexform, like example below. How set userFunc "parameters" in xml?

 <settings.map>
    <TCEforms>
      <label>Map</label>
    <config>
        <type>user</type>     
        <userFunc>Vendor\Extension\Utility\LocationUtility->render</userFunc>                                      
      <parameters>
      </parameters> 
      </config>
    </TCEforms>
  </settings.map>

回答1:


It should be:

<settings.map>
    <TCEforms>
        <label>Map</label>
        <config>
            <type>user</type>     
            <userFunc>\Vendor\Extension\Utility\LocationUtility->render</userFunc>                                      
            <parameters>
                <lng>lng</lng>
                <lat>lat</lat>
                <address>address</address>
            </parameters> 
        </config>
    </TCEforms>
</settings.map>

By the way, you should start a namespace with a \



来源:https://stackoverflow.com/questions/46558494/how-set-userfunc-parameters-in-typo3-flexform

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!