10
10
use Magento \Bundle \Helper \Catalog \Product \Configuration ;
11
11
use Magento \Bundle \Model \Option ;
12
12
use Magento \Catalog \Model \Product ;
13
- use Magento \Framework \ Exception \ LocalizedException ;
13
+ use Magento \Catalog \ Model \ Product \ Configuration \ Item \ ItemInterface ;
14
14
use Magento \Framework \Pricing \Helper \Data ;
15
15
use Magento \Framework \Serialize \SerializerInterface ;
16
- use Magento \Wishlist \Model \Item ;
17
16
18
17
/**
19
18
* Data provider for bundled product options
@@ -51,13 +50,13 @@ public function __construct(
51
50
}
52
51
53
52
/**
54
- * Extract data for a bundled wishlist item
53
+ * Extract data for a bundled item
55
54
*
56
- * @param Item $item
55
+ * @param ItemInterface $item
57
56
*
58
57
* @return array
59
58
*/
60
- public function getData (Item $ item ): array
59
+ public function getData (ItemInterface $ item ): array
61
60
{
62
61
$ options = [];
63
62
$ product = $ item ->getProduct ();
@@ -89,11 +88,11 @@ public function getData(Item $item): array
89
88
* Build bundle product options based on current selection
90
89
*
91
90
* @param Option[] $bundleOptions
92
- * @param Item $item
91
+ * @param ItemInterface $item
93
92
*
94
93
* @return array
95
94
*/
96
- private function buildBundleOptions (array $ bundleOptions , Item $ item ): array
95
+ private function buildBundleOptions (array $ bundleOptions , ItemInterface $ item ): array
97
96
{
98
97
$ options = [];
99
98
foreach ($ bundleOptions as $ bundleOption ) {
@@ -116,13 +115,11 @@ private function buildBundleOptions(array $bundleOptions, Item $item): array
116
115
* Build bundle product option values based on current selection
117
116
*
118
117
* @param Product[] $selections
119
- * @param Item $item
118
+ * @param ItemInterface $item
120
119
*
121
120
* @return array
122
- *
123
- * @throws LocalizedException
124
121
*/
125
- private function buildBundleOptionValues (array $ selections , Item $ item ): array
122
+ private function buildBundleOptionValues (array $ selections , ItemInterface $ item ): array
126
123
{
127
124
$ product = $ item ->getProduct ();
128
125
$ values = [];
0 commit comments