D. Vasiliev
D. Vasiliev

Reputation: 97

How set userFunc "parameters" in TYPO3 flexform

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>

Upvotes: 0

Views: 951

Answers (1)

Thomas L&#246;ffler
Thomas L&#246;ffler

Reputation: 6164

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 \

Upvotes: 1

Related Questions