File tree 5 files changed +52
-5
lines changed
Sales/view/adminhtml/ui_component 5 files changed +52
-5
lines changed Original file line number Diff line number Diff line change 10
10
<observer name =" customer_address_before_save_viv_observer" instance =" Magento\Customer\Observer\BeforeAddressSaveObserver" />
11
11
</event >
12
12
<event name =" customer_address_save_after" >
13
- <observer name =" customer_addres_after_save_viv_observer " instance =" Magento\Customer\Observer\AfterAddressSaveObserver" />
13
+ <observer name =" customer_address_after_save_viv_observer " instance =" Magento\Customer\Observer\AfterAddressSaveObserver" />
14
14
</event >
15
15
<event name =" sales_quote_save_after" >
16
16
<observer name =" customer_visitor" instance =" Magento\Customer\Observer\Visitor\BindQuoteCreateObserver" />
Original file line number Diff line number Diff line change 34
34
<listingToolbar name =" listing_top" >
35
35
<bookmark name =" bookmarks" />
36
36
<columnsControls name =" columns_controls" />
37
- <exportButton name =" export_button" />
37
+ <exportButton name =" export_button" >
38
+ <argument name =" data" xsi : type =" array" >
39
+ <item name =" config" xsi : type =" array" >
40
+ <item name =" additionalParams" xsi : type =" array" >
41
+ <item xsi : type =" string" name =" order_id" >*</item >
42
+ </item >
43
+ </item >
44
+ </argument >
45
+ </exportButton >
38
46
<filterSearch name =" fulltext" />
39
47
<filters name =" listing_filters" >
40
48
<filterSelect name =" store_id" >
Original file line number Diff line number Diff line change 34
34
<listingToolbar name =" listing_top" >
35
35
<bookmark name =" bookmarks" />
36
36
<columnsControls name =" columns_controls" />
37
- <exportButton name =" export_button" />
37
+ <exportButton name =" export_button" >
38
+ <argument name =" data" xsi : type =" array" >
39
+ <item name =" config" xsi : type =" array" >
40
+ <item name =" additionalParams" xsi : type =" array" >
41
+ <item xsi : type =" string" name =" order_id" >*</item >
42
+ </item >
43
+ </item >
44
+ </argument >
45
+ </exportButton >
38
46
<filterSearch name =" fulltext" />
39
47
<filters name =" listing_filters" >
40
48
<filterSelect name =" store_id" >
Original file line number Diff line number Diff line change 34
34
<listingToolbar name =" listing_top" >
35
35
<bookmark name =" bookmarks" />
36
36
<columnsControls name =" columns_controls" />
37
- <exportButton name =" export_button" />
37
+ <exportButton name =" export_button" >
38
+ <argument name =" data" xsi : type =" array" >
39
+ <item name =" config" xsi : type =" array" >
40
+ <item name =" additionalParams" xsi : type =" array" >
41
+ <item xsi : type =" string" name =" order_id" >*</item >
42
+ </item >
43
+ </item >
44
+ </argument >
45
+ </exportButton >
38
46
<filterSearch name =" fulltext" />
39
47
<filters name =" listing_filters" >
40
48
<filterSelect name =" store_id" >
Original file line number Diff line number Diff line change @@ -54,16 +54,39 @@ public function getComponentName()
54
54
*/
55
55
public function prepare ()
56
56
{
57
+ $ context = $ this ->getContext ();
57
58
$ config = $ this ->getData ('config ' );
58
59
if (isset ($ config ['options ' ])) {
59
60
$ options = [];
60
61
foreach ($ config ['options ' ] as $ option ) {
61
- $ option ['url ' ] = $ this ->urlBuilder ->getUrl ($ option ['url ' ]);
62
+ $ additionalParams = $ this ->getAdditionalParams ($ config , $ context );
63
+ $ option ['url ' ] = $ this ->urlBuilder ->getUrl ($ option ['url ' ], $ additionalParams );
62
64
$ options [] = $ option ;
63
65
}
64
66
$ config ['options ' ] = $ options ;
65
67
$ this ->setData ('config ' , $ config );
66
68
}
67
69
parent ::prepare ();
68
70
}
71
+
72
+ /**
73
+ * Get export button additional parameters
74
+ *
75
+ * @param array $config
76
+ * @param ContextInterface $context
77
+ * @return array
78
+ */
79
+ private function getAdditionalParams ($ config , $ context )
80
+ {
81
+ $ additionalParams = [];
82
+ if (isset ($ config ['additionalParams ' ])) {
83
+ foreach ($ config ['additionalParams ' ] as $ paramName => $ paramValue ) {
84
+ if ('* ' == $ paramValue ) {
85
+ $ paramValue = $ context ->getRequestParam ($ paramName );
86
+ }
87
+ $ additionalParams [$ paramName ] = $ paramValue ;
88
+ }
89
+ }
90
+ return $ additionalParams ;
91
+ }
69
92
}
You can’t perform that action at this time.
0 commit comments