Magento2 Magento 2;无法将自定义参数传递到UI窗体的“保存”按钮中

Magento2 Magento 2;无法将自定义参数传递到UI窗体的“保存”按钮中,magento2,uicomponents,Magento2,Uicomponents,我想通过ui adminform的save按钮传递一个值/参数 我试过这个: public function getButtonData() { $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $request = $objectManager->get('Magento\Framework\App\RequestInterface'); $i

我想通过ui adminform的save按钮传递一个值/参数

我试过这个:

public function getButtonData()
    {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $request = $objectManager->get('Magento\Framework\App\RequestInterface');
        $id = $request->getParam('id');

        return
            [
                'label' => __('Save'),
                'class' => 'save primary',
                'on_click' => '',
                'sort_order' => 80,
                'data_attribute' => [
                    'mage-init' => [
                        'Magento_Ui/js/form/button-adapter' => [
                            'actions' => [
                                [
                                    'targetName' => 'thechateau_magenest_bookable_save',
                                    'actionName' => 'save',
                                    'params' => [
                                        true,
                                        ['multidome_id' =>$id],
                                    ]
                                ]
                            ]
                        ]
                    ],

                ]
            ];
    }
我确实可以在phtml页面的save按钮中看到这些值

<button id="save" title="Save" type="button" class="action- scalable save primary" data-mage-init="{&quot;Magento_Ui\/js\/form\/button-adapter&quot;:{&quot;actions&quot;:[{&quot;targetName&quot;:&quot;thechateau_magenest_bookable_save&quot;,&quot;actionName&quot;:&quot;save&quot;,&quot;params&quot;:[true,{&quot;multidome_id&quot;:&quot;1&quot;}]}]}}"  data-ui-id="save-button" >
    <span>Save</span>
</button>
我还尝试将其添加为“保存”按钮URL的一部分,但它甚至没有显示在以下页面:

public function getSaveUrl()
    {
        return $this->getUrl('*/*/save',['param'=>'value']);

    }

嗨,找到答案了吗?我也有同样的问题。嗨,找到答案了吗?我也有同样的问题。
public function getSaveUrl()
    {
        return $this->getUrl('*/*/save',['param'=>'value']);

    }