我在我的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',
),
),
),
我需要在flexform中使用相同的配置,如下例所示。如何在xml中设置userFunc“parameters”?
<settings.map>
<TCEforms>
<label>Map</label>
<config>
<type>user</type>
<userFunc>Vendor\Extension\Utility\LocationUtility->render</userFunc>
<parameters>
</parameters>
</config>
</TCEforms>
</settings.map>
答案 0 :(得分:0)
应该是:
<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>
顺便说一句,您应该使用\